runs.py 694 B

1234567891011121314151617181920212223
  1. from typing import List, Optional
  2. from pydantic import BaseModel
  3. from sqlmodel import Field
  4. class ToolOutput(BaseModel):
  5. tool_call_id: Optional[str] = Field(
  6. None,
  7. description="The ID of the tool call in the `required_action` "
  8. "object within the run object the output is being submitted for.",
  9. )
  10. output: Optional[str] = Field(
  11. None,
  12. description="The output of the tool call to be submitted to continue the run.",
  13. )
  14. class SubmitToolOutputsRunRequest(BaseModel):
  15. tool_outputs: List[ToolOutput] = Field(
  16. ..., description="A list of tools for which the outputs are being submitted."
  17. )
  18. stream: Optional[bool] = False