Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyielia committed Feb 11, 2025
1 parent 8f3bddf commit 1092d89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions vizro-ai/src/vizro_ai/dashboard/_pydantic_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def _get_pydantic_model(
if "google" in llm_model.__class__.__module__.lower():
return _handle_google_llm_response(llm_model, response_model, prompt, message_content)

# For other models, use standard structured output
pydantic_llm = prompt | llm_model.with_structured_output(response_model)
return pydantic_llm.invoke(message_content)

Expand Down
7 changes: 6 additions & 1 deletion vizro-ai/src/vizro_ai/plot/_response_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pydantic.v1 import BaseModel, Field, PrivateAttr, create_model, validator
except ImportError: # pragma: no cov
from pydantic import BaseModel, Field, PrivateAttr, create_model, validator
import logging
from typing import Optional, Union

import autoflake
Expand Down Expand Up @@ -175,7 +176,11 @@ class ChartPlan(BaseChartPlan):
Insights to what the chart explains or tries to show.
Ideally concise and between 30 and 60 words.""",
)
code_explanation: str = Field(..., description="Explanation of the code steps used for `chart_code` field.")
code_explanation: str = Field(
...,
description="""
Explanation of the code steps used for `chart_code` field.""",
)


class ChartPlanFactory:
Expand Down

0 comments on commit 1092d89

Please sign in to comment.