mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 18:00:36 +00:00
formatting
This commit is contained in:
parent
dcb3dc4211
commit
a605cc2e14
1 changed files with 2 additions and 3 deletions
|
|
@ -373,6 +373,7 @@ class ToolExecutor:
|
||||||
mcp_completed_event = OpenAIResponseObjectStreamResponseMcpCallCompleted(
|
mcp_completed_event = OpenAIResponseObjectStreamResponseMcpCallCompleted(
|
||||||
sequence_number=sequence_number,
|
sequence_number=sequence_number,
|
||||||
)
|
)
|
||||||
|
yield ToolExecutionResult(stream_event=mcp_completed_event, sequence_number=sequence_number)
|
||||||
elif function_name == "web_search":
|
elif function_name == "web_search":
|
||||||
sequence_number += 1
|
sequence_number += 1
|
||||||
web_completion_event = OpenAIResponseObjectStreamResponseWebSearchCallCompleted(
|
web_completion_event = OpenAIResponseObjectStreamResponseWebSearchCallCompleted(
|
||||||
|
|
@ -488,8 +489,6 @@ class ToolExecutor:
|
||||||
input_message = OpenAIToolMessageParam(content=msg_content, tool_call_id=tool_call_id) # type: ignore[arg-type]
|
input_message = OpenAIToolMessageParam(content=msg_content, tool_call_id=tool_call_id) # type: ignore[arg-type]
|
||||||
else:
|
else:
|
||||||
text = str(error_exc) if error_exc else "Tool execution failed"
|
text = str(error_exc) if error_exc else "Tool execution failed"
|
||||||
input_message = OpenAIToolMessageParam(
|
input_message = OpenAIToolMessageParam(content=text, tool_call_id=tool_call_id)
|
||||||
content=text, tool_call_id=tool_call_id
|
|
||||||
)
|
|
||||||
|
|
||||||
return message, input_message
|
return message, input_message
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue