File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
zhipuai/api_resource/agents Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,27 @@ def invoke(
5959 stream_cls = StreamResponse [AgentsCompletionChunk ],
6060 )
6161
62+ def async_result (
63+ self ,
64+ agent_id : Optional [str ] | NotGiven = NOT_GIVEN ,
65+ async_id : Optional [str ] | NotGiven = NOT_GIVEN ,
66+ conversation_id : Optional [str ] | NotGiven = NOT_GIVEN ,
67+ custom_variables : object = NOT_GIVEN ,
68+ extra_headers : Headers | None = None ,
69+ extra_body : Body | None = None ,
70+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
71+ ) -> AgentsCompletion :
72+ body = deepcopy_minimal ({
73+ "agent_id" : agent_id ,
74+ "async_id" : async_id ,
75+ "conversation_id" : conversation_id ,
76+ "custom_variables" : custom_variables
77+ })
78+ return self ._post (
79+ "/v1/agents/async-result" ,
80+ body = body ,
81+ options = make_request_options (
82+ extra_headers = extra_headers , extra_body = extra_body , timeout = timeout
83+ ),
84+ cast_type = AgentsCompletion ,
85+ )
You can’t perform that action at this time.
0 commit comments