Compare commits

...

1 Commits

Author SHA1 Message Date
Erick Friis
8ea3939b9f docs: google vertex partner docs 2024-01-09 11:02:22 -08:00
5 changed files with 21 additions and 21 deletions

View File

@@ -41,7 +41,7 @@
},
"outputs": [],
"source": [
"!pip install -U google-cloud-aiplatform"
"!pip install -U langchain-google-vertexai"
]
},
{
@@ -50,7 +50,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain_community.chat_models import ChatVertexAI\n",
"from langchain_google_vertexai import ChatVertexAI\n",
"from langchain_core.prompts import ChatPromptTemplate"
]
},

View File

@@ -54,7 +54,7 @@
"metadata": {},
"outputs": [],
"source": [
"#!pip install langchain google-cloud-aiplatform"
"%pip install --upgrade --quiet langchain langchain-google-vertexai"
]
},
{
@@ -76,7 +76,7 @@
}
],
"source": [
"from langchain_community.llms import VertexAI\n",
"from langchain_google_vertexai import VertexAI\n",
"\n",
"llm = VertexAI()\n",
"print(llm(\"What are some of the pros and cons of Python as a programming language?\"))"
@@ -414,7 +414,7 @@
}
],
"source": [
"from langchain_community.chat_models import ChatVertexAI\n",
"from langchain_google_vertexai import ChatVertexAI\n",
"from langchain_core.messages import HumanMessage\n",
"\n",
"llm = ChatVertexAI(model_name=\"gemini-ultra-vision\")\n",
@@ -592,7 +592,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain_community.llms import VertexAIModelGarden"
"from langchain_google_vertexai import VertexAIModelGarden"
]
},
{

View File

@@ -57,16 +57,16 @@ The value of image_url can be any of the following:
Access PaLM chat models like `chat-bison` and `codechat-bison` via Google Cloud.
We need to install `google-cloud-aiplatform` python package.
We need to install `langchain-google-vertexai` python package.
```bash
pip install google-cloud-aiplatform
pip install langchain-google-vertexai
```
See a [usage example](/docs/integrations/chat/google_vertex_ai_palm).
```python
from langchain_community.chat_models import ChatVertexAI
from langchain_google_vertexai import ChatVertexAI
```
## Document Loaders
@@ -93,32 +93,32 @@ from langchain_community.document_loaders import BigQueryLoader
Access to `Gemini` and `PaLM` LLMs (like `text-bison` and `code-bison`) via `Google Vertex AI`.
We need to install `google-cloud-aiplatform` python package.
We need to install `langchain-google-vertexai` python package.
```bash
pip install google-cloud-aiplatform
pip install langchain-google-vertexai
```
See a [usage example](/docs/integrations/llms/google_vertex_ai_palm).
```python
from langchain_community.llms import VertexAI
from langchain_google_vertexai import VertexAI
```
### Model Garden
Access PaLM and hundreds of OSS models via `Vertex AI Model Garden`.
We need to install `google-cloud-aiplatform` python package.
We need to install `langchain-google-vertexai` python package.
```bash
pip install google-cloud-aiplatform
pip install langchain-google-vertexai
```
See a [usage example](/docs/integrations/llms/google_vertex_ai_palm#vertex-model-garden).
```python
from langchain_community.llms import VertexAIModelGarden
from langchain_google_vertexai import VertexAIModelGarden
```
@@ -193,7 +193,7 @@ from langchain_community.document_loaders import GoogleSpeechToTextLoader
We need to install several python packages.
```bash
pip install tensorflow google-cloud-aiplatform tensorflow-hub tensorflow-text
pip install tensorflow langchain-google-vertexai tensorflow-hub tensorflow-text
```
See a [usage example](/docs/integrations/vectorstores/google_vertex_ai_vector_search).

View File

@@ -12,7 +12,7 @@
"\n",
"By default, Google Cloud [does not use](https://cloud.google.com/vertex-ai/docs/generative-ai/data-governance#foundation_model_development) Customer Data to train its foundation models as part of Google Cloud`s AI/ML Privacy Commitment. More details about how Google processes data can also be found in [Google's Customer Data Processing Addendum (CDPA)](https://cloud.google.com/terms/data-processing-addendum).\n",
"\n",
"To use Vertex AI PaLM you must have the `google-cloud-aiplatform` Python package installed and either:\n",
"To use Vertex AI PaLM you must have the `langchain-google-vertexai` Python package installed and either:\n",
"- Have credentials configured for your environment (gcloud, workload identity, etc...)\n",
"- Store the path to a service account JSON file as the GOOGLE_APPLICATION_CREDENTIALS environment variable\n",
"\n",
@@ -32,7 +32,7 @@
},
"outputs": [],
"source": [
"#!pip install google-cloud-aiplatform"
"%pip install --upgrade --quiet langchain langchain-google-vertexai"
]
},
{
@@ -41,7 +41,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain_community.embeddings import VertexAIEmbeddings"
"from langchain_google_vertexai import VertexAIEmbeddings"
]
},
{

View File

@@ -45,7 +45,7 @@
},
"outputs": [],
"source": [
"! pip install langchain google-cloud-aiplatform google-cloud-bigquery --upgrade --user"
"%pip install --upgrade --quiet langchain langchain-google-vertexai google-cloud-bigquery --upgrade --user"
]
},
{
@@ -198,7 +198,7 @@
},
"outputs": [],
"source": [
"from langchain_community.embeddings import VertexAIEmbeddings\n",
"from langchain_google_vertexai import VertexAIEmbeddings\n",
"\n",
"embedding = VertexAIEmbeddings(\n",
" model_name=\"textembedding-gecko@latest\", project=PROJECT_ID\n",