GPT4 responded with a JSON object != schema.

Retry the request, advising what the issue was
This commit is contained in:
Nicholas Albion
2023-10-02 18:59:38 +11:00
parent 6c571f0946
commit 5fdc853768
15 changed files with 126 additions and 16 deletions

View File

@@ -66,10 +66,8 @@ def parse_agent_response(response, function_calls: Union[FunctionCallSet, None])
response: The response from the agent.
function_calls: Optional function calls associated with the response.
Returns:
The post-processed response.
Returns: The post-processed response.
"""
if function_calls:
text = response['text']
values = list(json.loads(text).values())