-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageIssue needs to be triaged/prioritizedIssue needs to be triaged/prioritized
Description
Bug Description
When using GoogleGenAI llm through the API, the stream_complete is not working and raises an error.
"pydantic_core._pydantic_core.ValidationError: 1 validation error for ChatMessage
blocks.0
Input should be a valid dictionary or object to extract fields from [type=model_attributes_type, input_value='What is the capital of France? answer short.', input_type=str]
For further information visit https://errors.pydantic.dev/2.12/v/model_attributes_type"
Version
0.14.7
Steps to Reproduce
from llama_index.llms.google_genai import GoogleGenAI
import config
llm = GoogleGenAI(
model="gemini-2.0-flash",
api_key=config.GEMINI_API_KEY,
context_window=10000,
)
resp = llm.stream_complete(["What is the capital of France? answer short."])
Relevant Logs/Tracbacks
venv/lib/python3.11/site-packages/pydantic/main.py", line 250, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for ChatMessage
blocks.0
Input should be a valid dictionary or object to extract fields from [type=model_attributes_type, input_value='What is the capital of France? answer short.', input_type=str]
For further information visit https://errors.pydantic.dev/2.12/v/model_attributes_typeMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageIssue needs to be triaged/prioritizedIssue needs to be triaged/prioritized