mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-19 13:23:35 +00:00
cli[patch], google-vertexai[patch]: readme template (#16470)
This commit is contained in:
parent
39d1cbfecf
commit
1f4ac62dee
@ -1 +1,45 @@
|
|||||||
# __package_name__
|
# __package_name__
|
||||||
|
|
||||||
|
This package contains the LangChain integration with __ModuleName__
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install -U __package_name__
|
||||||
|
```
|
||||||
|
|
||||||
|
And you should configure credentials by setting the following environment variables:
|
||||||
|
|
||||||
|
* TODO: fill this out
|
||||||
|
|
||||||
|
## Chat Models
|
||||||
|
|
||||||
|
`Chat__ModuleName__` class exposes chat models from __ModuleName__.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __module_name__ import Chat__ModuleName__
|
||||||
|
|
||||||
|
llm = Chat__ModuleName__()
|
||||||
|
llm.invoke("Sing a ballad of LangChain.")
|
||||||
|
```
|
||||||
|
|
||||||
|
## Embeddings
|
||||||
|
|
||||||
|
`__ModuleName__Embeddings` class exposes embeddings from __ModuleName__.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __module_name__ import __ModuleName__Embeddings
|
||||||
|
|
||||||
|
embeddings = __ModuleName__Embeddings()
|
||||||
|
embeddings.embed_query("What is the meaning of life?")
|
||||||
|
```
|
||||||
|
|
||||||
|
## LLMs
|
||||||
|
`__ModuleName__LLM` class exposes LLMs from __ModuleName__.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from __module_name__ import __ModuleName__LLM
|
||||||
|
|
||||||
|
llm = __ModuleName__LLM()
|
||||||
|
llm.invoke("The meaning of life is")
|
||||||
|
```
|
||||||
|
@ -10,7 +10,7 @@ pip install -U langchain-google-vertexai
|
|||||||
|
|
||||||
## Chat Models
|
## Chat Models
|
||||||
|
|
||||||
`ChatVertexAI` class exposes models .
|
`ChatVertexAI` class exposes models such as `gemini-pro` and `chat-bison`.
|
||||||
|
|
||||||
To use, you should have Google Cloud project with APIs enabled, and configured credentials. Initialize the model as:
|
To use, you should have Google Cloud project with APIs enabled, and configured credentials. Initialize the model as:
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ The value of `image_url` can be any of the following:
|
|||||||
|
|
||||||
You can use Google Cloud's embeddings models as:
|
You can use Google Cloud's embeddings models as:
|
||||||
|
|
||||||
```
|
```python
|
||||||
from langchain_google_vertexai import VertexAIEmbeddings
|
from langchain_google_vertexai import VertexAIEmbeddings
|
||||||
|
|
||||||
embeddings = VertexAIEmbeddings()
|
embeddings = VertexAIEmbeddings()
|
||||||
|
Loading…
Reference in New Issue
Block a user