-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Description
langchain-google/libs/vertexai/langchain_google_vertexai/chat_models.py
Lines 309 to 310 in dc186f9
if isinstance(raw_content, int): # type: ignore | |
raw_content = str(raw_content) # type: ignore |
When sending a message like "16.2" the library fails on line 314. I am assuming its because isinstance(raw_content, float)
is not handled
langchain-google/libs/vertexai/langchain_google_vertexai/chat_models.py
Lines 305 to 320 in dc186f9
pass | |
# A linting error is thrown here because it does not think this line is | |
# reachable due to typing, but mypy is wrong so we ignore the lint | |
# error. | |
if isinstance(raw_content, int): # type: ignore | |
raw_content = str(raw_content) # type: ignore | |
if isinstance(raw_content, str): | |
raw_content = [raw_content] | |
result = [] | |
for raw_part in raw_content: | |
part = _convert_to_prompt(raw_part) | |
if part: | |
result.append(part) | |
return result | |
vertex_messages: List[Content] = [] |
mjvankampen
Metadata
Metadata
Assignees
Labels
No labels