mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 01:48:57 +00:00
openai docs nit (#10656)
This commit is contained in:
parent
c7bd3b918c
commit
3fb9cfb4ae
@ -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…
Reference in New Issue
Block a user