Refactor logging statements for better readability and debugging

This commit is contained in:
mrT23 2024-02-25 10:01:53 +02:00
parent 34e421f79b
commit 8252b98bf5
No known key found for this signature in database
GPG key ID: D350490E39D5F5AD

View file

@ -115,7 +115,7 @@ class LiteLLMAIHandler(BaseAiHandler):
if self.aws_bedrock_client:
kwargs["aws_bedrock_client"] = self.aws_bedrock_client
get_logger().debug(f"Prompts", system=system, user=user)
get_logger().debug(f"Prompts", messages={"system": system, "user": user})
response = await acompletion(**kwargs)
except (APIError, Timeout, TryAgain) as e:
get_logger().error("Error during OpenAI inference: ", e)