Update schemas.py with ResultDict model

This commit is contained in:
anovazzi1 2024-01-19 17:48:23 -03:00
commit 2e79b597fb
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -214,4 +214,10 @@ class ApiKeyCreateRequest(BaseModel):
api_key: str
class VerticesOrderResponse(BaseModel):
ids: List[List[str]]
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."""