forked from phoenix/litellm-mirror
(fix) undo - model_dump_json() before logging
This commit is contained in:
parent
40b9f1dcb1
commit
79ab1aa35b
1 changed files with 2 additions and 2 deletions
|
@ -386,13 +386,13 @@ class OpenAIChatCompletion(BaseLLM):
|
||||||
response = await openai_aclient.chat.completions.create(
|
response = await openai_aclient.chat.completions.create(
|
||||||
**data, timeout=timeout
|
**data, timeout=timeout
|
||||||
)
|
)
|
||||||
|
stringified_response = response.model_dump_json()
|
||||||
logging_obj.post_call(
|
logging_obj.post_call(
|
||||||
input=data["messages"],
|
input=data["messages"],
|
||||||
api_key=api_key,
|
api_key=api_key,
|
||||||
original_response=response,
|
original_response=stringified_response,
|
||||||
additional_args={"complete_input_dict": data},
|
additional_args={"complete_input_dict": data},
|
||||||
)
|
)
|
||||||
stringified_response = response.model_dump_json()
|
|
||||||
return convert_to_model_response_object(
|
return convert_to_model_response_object(
|
||||||
response_object=json.loads(stringified_response),
|
response_object=json.loads(stringified_response),
|
||||||
model_response_object=model_response,
|
model_response_object=model_response,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue