Skip to content

Commit

Permalink
replace parse_raw with model_validate_json
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Jan 18, 2025
1 parent 7e48c91 commit 208ca8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions defog_utils/utils_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def chat_gemini(

if response_format:
# convert the content into Pydantic class
content = response_format.parse_raw(content)
content = response_format.model_validate_json(content)

return LLMResponse(
model=model,
Expand Down Expand Up @@ -494,7 +494,7 @@ async def chat_gemini_async(

if response_format:
# convert the content into Pydantic class
content = response_format.parse_raw(content)
content = response_format.model_validate_json(content)

return LLMResponse(
model=model,
Expand Down

0 comments on commit 208ca8d

Please sign in to comment.