diff --git a/app/domain/__init__.py b/app/domain/__init__.py index b32ca726..27fd881d 100644 --- a/app/domain/__init__.py +++ b/app/domain/__init__.py @@ -14,3 +14,4 @@ ) from .pyris_message import PyrisMessage, IrisMessageRole from app.domain.data import image_message_content_dto +from app.domain.feature_dto import FeatureDTO diff --git a/app/domain/feature_dto.py b/app/domain/feature_dto.py new file mode 100644 index 00000000..997e2722 --- /dev/null +++ b/app/domain/feature_dto.py @@ -0,0 +1,7 @@ +from pydantic import BaseModel + + +class FeatureDTO(BaseModel): + id: str + name: str + description: str diff --git a/app/web/routers/pipelines.py b/app/web/routers/pipelines.py index f92f0d68..eb198199 100644 --- a/app/web/routers/pipelines.py +++ b/app/web/routers/pipelines.py @@ -19,6 +19,7 @@ from app.pipeline.chat.course_chat_pipeline import CourseChatPipeline from app.pipeline.chat.exercise_chat_pipeline import ExerciseChatPipeline from app.dependencies import TokenValidator +from app.domain import FeatureDTO from app.pipeline.competency_extraction_pipeline import CompetencyExtractionPipeline router = APIRouter(prefix="/api/v1/pipelines", tags=["pipelines"]) @@ -127,9 +128,51 @@ def run_competency_extraction_pipeline( thread.start() -@router.get("/{feature}") +@router.get("/{feature}/variants") def get_pipeline(feature: str): """ - Get the pipeline for the given feature. + Get the pipeline variants for the given feature. """ - return Response(status_code=status.HTTP_501_NOT_IMPLEMENTED) + match feature: + case "CHAT": + return [ + FeatureDTO( + id="default", + name="Default Variant", + description="Default chat variant.", + ) + ] + case "PROGRAMMING_EXERCISE_CHAT": + return [ + FeatureDTO( + id="default", + name="Default Variant", + description="Default programming exercise chat variant.", + ) + ] + case "COURSE_CHAT": + return [ + FeatureDTO( + id="default", + name="Default Variant", + description="Default course chat variant.", + ) + ] + case "COMPETENCY_GENERATION": + return [ + FeatureDTO( + id="default", + name="Default Variant", + description="Default competency generation variant.", + ) + ] + case "LECTURE_INGESTION": + return [ + FeatureDTO( + id="default", + name="Default Variant", + description="Default lecture ingestion variant.", + ) + ] + case _: + return Response(status_code=status.HTTP_400_BAD_REQUEST) diff --git a/requirements.txt b/requirements.txt index 4ea47bc0..2f792ec3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,17 @@ black==24.8.0 -fastapi==0.112.2 +fastapi==0.115.0 flake8==7.1.1 -langchain==0.2.14 -ollama==0.3.1 -openai==1.42.0 -pre-commit==3.8.0 +langchain==0.3.2 +ollama==0.3.3 +openai==1.51.0 +pre-commit==4.0.0 psutil==6.0.0 -pydantic==2.8.2 -PyMuPDF==1.24.9 -pytz==2024.1 +pydantic==2.9.2 +PyMuPDF==1.24.11 +pytz==2024.2 PyYAML==6.0.2 requests==2.32.3 -sentry-sdk[starlette,fastapi,openai]==2.13.0 -unstructured==0.15.7 -uvicorn==0.30.6 -weaviate-client==4.7.1 +sentry-sdk[starlette,fastapi,openai]==2.15.0 +unstructured==0.15.13 +uvicorn==0.31.0 +weaviate-client==4.8.1