fixed openai_functions api_response format args err (#9968)

root cause: args may not have a key (params) resulting in an error
This commit is contained in:
Bagatur 2023-08-31 00:49:19 -07:00 committed by GitHub
commit e60e1cdf23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: