diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index 25c00eb2e..3bb6cd2b8 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -3,7 +3,7 @@ import time from fastapi import APIRouter, Depends, HTTPException, Query, WebSocket, WebSocketException, status,Body from fastapi.responses import StreamingResponse from langflow.api.utils import build_input_keys_response, format_elapsed_time -from langflow.api.v1.schemas import BuildStatus, BuiltResponse, InitResponse, StreamData, VerticesOrderResponse +from langflow.api.v1.schemas import BuildStatus, BuiltResponse, InitResponse, ResultDict, StreamData, VerticesOrderResponse from langflow.services.database.models.flow.flow import Flow from langflow.graph.graph.base import Graph from langflow.services.auth.utils import get_current_active_user, get_current_user_by_jwt diff --git a/src/backend/langflow/api/v1/schemas.py b/src/backend/langflow/api/v1/schemas.py index b4ac99a0e..2ee673fae 100644 --- a/src/backend/langflow/api/v1/schemas.py +++ b/src/backend/langflow/api/v1/schemas.py @@ -214,4 +214,10 @@ class ApiKeyCreateRequest(BaseModel): api_key: str class VerticesOrderResponse(BaseModel): - ids: List[List[str]] \ No newline at end of file + ids: List[List[str]] + + +class ResultDict(BaseModel): + results: Optional[Any] = Field(default_factory=dict) + artifacts: Optional[Any] = Field(default_factory=dict) + """Outputs of the vertex build process."""