mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Request cancellation sample (#459)
* request cancellation via tasks * fix missing kwargs
This commit is contained in:
committed by
GitHub
Unverified
parent
011edfe420
commit
feb4e908ae
@@ -90,7 +90,7 @@ def _tool_call_non_streaming(
|
||||
response: ChatResponse | None = None
|
||||
fcc_messages: list[ChatMessage] = []
|
||||
for attempt_idx in range(getattr(self, "__maximum_iterations_per_request", 10)):
|
||||
response = await func(self, messages=messages, chat_options=chat_options)
|
||||
response = await func(self, messages=messages, chat_options=chat_options, **kwargs)
|
||||
# if there are function calls, we will handle them first
|
||||
function_results = {
|
||||
it.call_id for it in response.messages[0].contents if isinstance(it, FunctionResultContent)
|
||||
|
||||
Reference in New Issue
Block a user