Skip to content

Commit

Permalink
Use model_dump() instead of dict()
Browse files Browse the repository at this point in the history
Closes #554
  • Loading branch information
simonw authored Aug 19, 2024
1 parent 6deed8f commit e867e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llm/default_plugins/openai_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def execute(self, prompt, stream, response, conversation=None):
stream=False,
**kwargs,
)
response.response_json = remove_dict_none_values(completion.dict())
response.response_json = remove_dict_none_values(completion.model_dump())
yield completion.choices[0].message.content

def get_client(self):
Expand Down Expand Up @@ -412,7 +412,7 @@ def execute(self, prompt, stream, response, conversation=None):
stream=False,
**kwargs,
)
response.response_json = remove_dict_none_values(completion.dict())
response.response_json = remove_dict_none_values(completion.model_dump())
yield completion.choices[0].text


Expand Down

0 comments on commit e867e13

Please sign in to comment.