openai docs nit (#10656)

pull/10600/head^2
Bagatur 1 year ago committed by GitHub
parent c7bd3b918c
commit 3fb9cfb4ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,6 +24,8 @@ pip install tiktoken
## LLM
See a [usage example](/docs/integrations/llms/openai).
```python
from langchain.llms import OpenAI
```
@ -32,16 +34,31 @@ If you are using a model hosted on `Azure`, you should use different wrapper for
```python
from langchain.llms import AzureOpenAI
```
For a more detailed walkthrough of the `Azure` wrapper, see [this notebook](/docs/integrations/llms/azure_openai_example.html)
For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/llms/azure_openai_example)
## Chat model
See a [usage example](/docs/integrations/chat_models/openai).
```python
from langchain.chat_models import ChatOpenAI
```
If you are using a model hosted on `Azure`, you should use different wrapper for that:
```python
from langchain.llms import AzureChatOpenAI
```
For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/chat_models/azure_openai)
## Text Embedding Model
See a [usage example](/docs/integrations/text_embedding/openai)
```python
from langchain.embeddings import OpenAIEmbeddings
```
For a more detailed walkthrough of this, see [this notebook](/docs/integrations/text_embedding/openai.html)
## Tokenizer
@ -54,15 +71,7 @@ You can also use it to count tokens when splitting documents with
from langchain.text_splitter import CharacterTextSplitter
CharacterTextSplitter.from_tiktoken_encoder(...)
```
For a more detailed walkthrough of this, see [this notebook](/docs/modules/data_connection/document_transformers/text_splitters/tiktoken.html)
## Chain
See a [usage example](/docs/guides/safety/moderation).
```python
from langchain.chains import OpenAIModerationChain
```
For a more detailed walkthrough of this, see [this notebook](/docs/modules/data_connection/document_transformers/text_splitters/tiktoken)
## Document Loader
@ -79,3 +88,12 @@ See a [usage example](/docs/integrations/retrievers/chatgpt-plugin).
```python
from langchain.retrievers import ChatGPTPluginRetriever
```
## Chain
See a [usage example](/docs/guides/safety/moderation).
```python
from langchain.chains import OpenAIModerationChain
```

Loading…
Cancel
Save