|
63 | 63 | "OpenAIResponseObjectStreamResponseMcpCallInProgress",
|
64 | 64 | "OpenAIResponseObjectStreamResponseMcpCallFailed",
|
65 | 65 | "OpenAIResponseObjectStreamResponseMcpCallCompleted",
|
| 66 | + "OpenAIResponseObjectStreamResponseContentPartAdded", |
| 67 | + "OpenAIResponseObjectStreamResponseContentPartAddedPart", |
| 68 | + "OpenAIResponseObjectStreamResponseContentPartAddedPartOpenAIResponseContentPartOutputText", |
| 69 | + "OpenAIResponseObjectStreamResponseContentPartAddedPartOpenAIResponseContentPartRefusal", |
| 70 | + "OpenAIResponseObjectStreamResponseContentPartDone", |
| 71 | + "OpenAIResponseObjectStreamResponseContentPartDonePart", |
| 72 | + "OpenAIResponseObjectStreamResponseContentPartDonePartOpenAIResponseContentPartOutputText", |
| 73 | + "OpenAIResponseObjectStreamResponseContentPartDonePartOpenAIResponseContentPartRefusal", |
66 | 74 | "OpenAIResponseObjectStreamResponseCompleted",
|
67 | 75 | ]
|
68 | 76 |
|
@@ -813,6 +821,82 @@ class OpenAIResponseObjectStreamResponseMcpCallCompleted(BaseModel):
|
813 | 821 | """Event type identifier, always "response.mcp_call.completed" """
|
814 | 822 |
|
815 | 823 |
|
| 824 | +class OpenAIResponseObjectStreamResponseContentPartAddedPartOpenAIResponseContentPartOutputText(BaseModel): |
| 825 | + text: str |
| 826 | + |
| 827 | + type: Literal["output_text"] |
| 828 | + |
| 829 | + |
| 830 | +class OpenAIResponseObjectStreamResponseContentPartAddedPartOpenAIResponseContentPartRefusal(BaseModel): |
| 831 | + refusal: str |
| 832 | + |
| 833 | + type: Literal["refusal"] |
| 834 | + |
| 835 | + |
| 836 | +OpenAIResponseObjectStreamResponseContentPartAddedPart: TypeAlias = Annotated[ |
| 837 | + Union[ |
| 838 | + OpenAIResponseObjectStreamResponseContentPartAddedPartOpenAIResponseContentPartOutputText, |
| 839 | + OpenAIResponseObjectStreamResponseContentPartAddedPartOpenAIResponseContentPartRefusal, |
| 840 | + ], |
| 841 | + PropertyInfo(discriminator="type"), |
| 842 | +] |
| 843 | + |
| 844 | + |
| 845 | +class OpenAIResponseObjectStreamResponseContentPartAdded(BaseModel): |
| 846 | + item_id: str |
| 847 | + """Unique identifier of the output item containing this content part""" |
| 848 | + |
| 849 | + part: OpenAIResponseObjectStreamResponseContentPartAddedPart |
| 850 | + """The content part that was added""" |
| 851 | + |
| 852 | + response_id: str |
| 853 | + """Unique identifier of the response containing this content""" |
| 854 | + |
| 855 | + sequence_number: int |
| 856 | + """Sequential number for ordering streaming events""" |
| 857 | + |
| 858 | + type: Literal["response.content_part.added"] |
| 859 | + """Event type identifier, always "response.content_part.added" """ |
| 860 | + |
| 861 | + |
| 862 | +class OpenAIResponseObjectStreamResponseContentPartDonePartOpenAIResponseContentPartOutputText(BaseModel): |
| 863 | + text: str |
| 864 | + |
| 865 | + type: Literal["output_text"] |
| 866 | + |
| 867 | + |
| 868 | +class OpenAIResponseObjectStreamResponseContentPartDonePartOpenAIResponseContentPartRefusal(BaseModel): |
| 869 | + refusal: str |
| 870 | + |
| 871 | + type: Literal["refusal"] |
| 872 | + |
| 873 | + |
| 874 | +OpenAIResponseObjectStreamResponseContentPartDonePart: TypeAlias = Annotated[ |
| 875 | + Union[ |
| 876 | + OpenAIResponseObjectStreamResponseContentPartDonePartOpenAIResponseContentPartOutputText, |
| 877 | + OpenAIResponseObjectStreamResponseContentPartDonePartOpenAIResponseContentPartRefusal, |
| 878 | + ], |
| 879 | + PropertyInfo(discriminator="type"), |
| 880 | +] |
| 881 | + |
| 882 | + |
| 883 | +class OpenAIResponseObjectStreamResponseContentPartDone(BaseModel): |
| 884 | + item_id: str |
| 885 | + """Unique identifier of the output item containing this content part""" |
| 886 | + |
| 887 | + part: OpenAIResponseObjectStreamResponseContentPartDonePart |
| 888 | + """The completed content part""" |
| 889 | + |
| 890 | + response_id: str |
| 891 | + """Unique identifier of the response containing this content""" |
| 892 | + |
| 893 | + sequence_number: int |
| 894 | + """Sequential number for ordering streaming events""" |
| 895 | + |
| 896 | + type: Literal["response.content_part.done"] |
| 897 | + """Event type identifier, always "response.content_part.done" """ |
| 898 | + |
| 899 | + |
816 | 900 | class OpenAIResponseObjectStreamResponseCompleted(BaseModel):
|
817 | 901 | response: ResponseObject
|
818 | 902 | """The completed response object"""
|
@@ -841,6 +925,8 @@ class OpenAIResponseObjectStreamResponseCompleted(BaseModel):
|
841 | 925 | OpenAIResponseObjectStreamResponseMcpCallInProgress,
|
842 | 926 | OpenAIResponseObjectStreamResponseMcpCallFailed,
|
843 | 927 | OpenAIResponseObjectStreamResponseMcpCallCompleted,
|
| 928 | + OpenAIResponseObjectStreamResponseContentPartAdded, |
| 929 | + OpenAIResponseObjectStreamResponseContentPartDone, |
844 | 930 | OpenAIResponseObjectStreamResponseCompleted,
|
845 | 931 | ],
|
846 | 932 | PropertyInfo(discriminator="type"),
|
|
0 commit comments