fixed openai_functions api_response format args err

root cause: args may not have a key (params) resulting in an error
This commit is contained in:
dafu 2023-08-30 09:49:42 +08:00
parent ffa5625134
commit c26deb6b38
No known key found for this signature in database
GPG Key ID: E81C9E3B0040915A

View File

@ -227,7 +227,7 @@ class SimpleRequestChain(Chain):
response = (
f"{api_response.status_code}: {api_response.reason}"
+ f"\nFor {name} "
+ f"Called with args: {args['params']}"
+ f"Called with args: {args.get('params','')}"
)
else:
try: