mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
add comments for openai tools_call respond bug.
This commit is contained in:
parent
0cc0a16e52
commit
bcda7ac951
1 changed files with 2 additions and 1 deletions
|
|
@ -248,7 +248,8 @@ class OpenAILLM(BaseLLM):
|
|||
)
|
||||
return self._parse_arguments(message.tool_calls[0].function.arguments)
|
||||
elif message.tool_calls is None and message.content is not None:
|
||||
# reponse is code, fix openai tools_call respond bug.
|
||||
# reponse is code, fix openai tools_call respond bug,
|
||||
# The response content is `code``, but it appears in the content instead of the arguments.
|
||||
code_formats = ("```", '"""', "'''")
|
||||
if message.content.startswith(code_formats) and message.content.endswith(code_formats):
|
||||
code = CodeParser.parse_code(None, message.content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue