Files
langchain/docs
Takuya Igei 6da2246215 Add support Vertex AI Gemini uses a public image URL (#14949)
## What

Since `langchain_google_genai.ChatGoogleGenerativeAI` supported A public
image URL, we add to support it in `langchain.chat_models.ChatVertexAI`
as well.

### Example

```py
from langchain.chat_models.vertexai import ChatVertexAI
from langchain_core.messages import HumanMessage

llm = ChatVertexAI(model_name="gemini-pro-vision")
image_message = {
    "type": "image_url",
    "image_url": {
        "url": "https://python.langchain.com/assets/images/cell-18-output-1-0c7fb8b94ff032d51bfe1880d8370104.png",
    },
}
text_message = {
    "type": "text",
    "text": "What is shown in this image?",
}
message = HumanMessage(content=[text_message, image_message])

output = llm([message])
print(output.content)
```

## Refs

-
https://python.langchain.com/docs/integrations/llms/google_vertex_ai_palm
-
https://python.langchain.com/docs/integrations/chat/google_generative_ai
2023-12-22 13:19:09 -08:00
..
2023-12-15 17:46:12 -08:00
2023-12-17 12:55:49 -08:00
2023-10-10 12:55:19 -07:00
2023-10-10 12:55:19 -07:00
2023-12-17 12:55:49 -08:00
2023-10-10 12:55:19 -07:00
2023-12-17 12:55:49 -08:00
2023-12-17 12:55:49 -08:00
2023-12-20 12:32:33 -08:00

LangChain Documentation

For more information on contributing to our documentation, see the Documentation Contributing Guide