Update schemas and chat.py files
This commit is contained in:
parent
8ab47639bf
commit
5a7e46ba12
2 changed files with 16 additions and 1 deletions
|
|
@ -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, ResultDict, StreamData, VerticesOrderResponse
|
||||
from langflow.api.v1.schemas import BuildStatus, BuiltResponse, InitResponse, ResultDict, StreamData, VertexBuildResponse, VerticesOrderResponse
|
||||
from langflow.graph.vertex.base import StatelessVertex
|
||||
from langflow.processing.process import process_tweaks_on_graph
|
||||
from langflow.services.database.models.flow.flow import Flow
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
|
@ -221,3 +222,17 @@ class ResultDict(BaseModel):
|
|||
results: Optional[Any] = Field(default_factory=dict)
|
||||
artifacts: Optional[Any] = Field(default_factory=dict)
|
||||
"""Outputs of the vertex build process."""
|
||||
|
||||
class VertexBuildResponse(BaseModel):
|
||||
id: str
|
||||
valid: bool
|
||||
params: Optional[str]
|
||||
"""JSON string of the params."""
|
||||
data: ResultDict
|
||||
"""Mapping of vertex ids to result dict containing the param name and result value."""
|
||||
timestamp: Optional[datetime] = Field(default_factory=datetime.utcnow)
|
||||
"""Timestamp of the build."""
|
||||
|
||||
|
||||
class VerticesBuiltResponse(BaseModel):
|
||||
vertices: List[VertexBuildResponse]
|
||||
Loading…
Add table
Add a link
Reference in a new issue