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
..
api_reference infra: cut down on integration steps (#14785) 2023-12-17 12:55:59 -08:00
docs Add support Vertex AI Gemini uses a public image URL (#14949) 2023-12-22 13:19:09 -08:00
scripts docs[patch], templates[patch]: Import from core (#14575) 2023-12-11 16:49:10 -08:00
src docs[patch]: fix zoom (#14786) 2023-12-15 17:46:12 -08:00
static docs: update langchain diagram (#14619) 2023-12-12 16:36:15 -08:00
.local_build.sh docs: developer docs (#14776) 2023-12-17 12:55:49 -08:00
babel.config.js Restructure docs (#11620) 2023-10-10 12:55:19 -07:00
code-block-loader.js Restructure docs (#11620) 2023-10-10 12:55:19 -07:00
docusaurus.config.js docs: fix api ref link (#14679) 2023-12-13 13:42:01 -08:00
package-lock.json docs[patch]: search experiment (#14254) 2023-12-04 16:58:26 -08:00
package.json docs[patch]: search experiment (#14254) 2023-12-04 16:58:26 -08:00
README.md docs: developer docs (#14776) 2023-12-17 12:55:49 -08:00
settings.ini Restructure docs (#11620) 2023-10-10 12:55:19 -07:00
sidebars.js docs: developer docs (#14776) 2023-12-17 12:55:49 -08:00
vercel_build.sh docs: developer docs (#14776) 2023-12-17 12:55:49 -08:00
vercel_requirements.txt infra: docs build install community editable (#14739) 2023-12-14 16:13:09 -08:00
vercel.json docs: alibaba cloud (#14772) 2023-12-20 12:32:33 -08:00

LangChain Documentation

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