|
18 | 18 | TResponse = Response |
19 | 19 | """A type alias for the Response type from the OpenAI SDK.""" |
20 | 20 |
|
21 | | -TResponseInputItem = ResponseInputItemParam |
| 21 | + |
| 22 | +class FunctionToolCallProgressItem(BaseModel): |
| 23 | + call_id: str |
| 24 | + """The unique ID of the function tool call generated by the model.""" |
| 25 | + |
| 26 | + progress: float = 0 |
| 27 | + """The current progress value of the function call. (e.g. 24)""" |
| 28 | + |
| 29 | + total: float = 0 |
| 30 | + """The total value of the function call. (e.g. 100)""" |
| 31 | + |
| 32 | + message: str = "" |
| 33 | + """The human readable progress information. (e.g. Starting render...)""" |
| 34 | + |
| 35 | + type: Literal["function_call_progress"] |
| 36 | + """The type of the function tool call progress. Always `function_call_progress`.""" |
| 37 | + |
| 38 | + |
| 39 | +TResponseInputItem: TypeAlias = Union[ |
| 40 | + ResponseInputItemParam, |
| 41 | + ResponseFunctionToolCallOutputItem, |
| 42 | + FunctionToolCallProgressItem, |
| 43 | +] |
22 | 44 | """A type alias for the ResponseInputItemParam type from the OpenAI SDK.""" |
23 | 45 |
|
24 | 46 | TResponseOutputItem = ResponseOutputItem |
@@ -50,27 +72,6 @@ class FunctionTool: |
50 | 72 | """A type alias for the FunctionTool class.""" |
51 | 73 |
|
52 | 74 |
|
53 | | -class FunctionToolCallProgressItem(BaseModel): |
54 | | - call_id: str |
55 | | - """The unique ID of the function tool call generated by the model.""" |
56 | | - |
57 | | - progress: float = 0 |
58 | | - """ |
59 | | - The current progress value of the function call. (e.g. 24) |
60 | | - total: Optional total value e.g. 100 |
61 | | - message: Optional message e.g. Starting render...A float between 0 and 1, where 0 means the function |
62 | | - """ |
63 | | - |
64 | | - total: float = 0 |
65 | | - """The total value of the function call. (e.g. 100)""" |
66 | | - |
67 | | - message: str = "" |
68 | | - """The human readable progress information. (e.g. Starting render...)""" |
69 | | - |
70 | | - type: Literal["function_call_progress"] |
71 | | - """The type of the function tool call progress. Always `function_call_progress`.""" |
72 | | - |
73 | | - |
74 | 75 | @dataclass |
75 | 76 | class MessageOutputItem: |
76 | 77 | """Represents a message from the LLM.""" |
|
0 commit comments