mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 04:07:54 +00:00
docs: Update openai README.md (#29146)
This commit is contained in:
parent
0a54aedb85
commit
5c2fbb5b86
@ -10,22 +10,6 @@ pip install langchain-openai
|
||||
```
|
||||
- Get an OpenAI api key and set it as an environment variable (`OPENAI_API_KEY`)
|
||||
|
||||
|
||||
## LLM
|
||||
|
||||
See a [usage example](http://python.langchain.com/docs/integrations/llms/openai).
|
||||
|
||||
```python
|
||||
from langchain_openai import OpenAI
|
||||
```
|
||||
|
||||
If you are using a model hosted on `Azure`, you should use different wrapper for that:
|
||||
```python
|
||||
from langchain_openai import AzureOpenAI
|
||||
```
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](http://python.langchain.com/docs/integrations/llms/azure_openai)
|
||||
|
||||
|
||||
## Chat model
|
||||
|
||||
See a [usage example](http://python.langchain.com/docs/integrations/chat/openai).
|
||||
@ -53,4 +37,19 @@ If you are using a model hosted on `Azure`, you should use different wrapper for
|
||||
```python
|
||||
from langchain_openai import AzureOpenAIEmbeddings
|
||||
```
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](https://python.langchain.com/docs/integrations/text_embedding/azureopenai)
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](https://python.langchain.com/docs/integrations/text_embedding/azureopenai)
|
||||
|
||||
|
||||
## LLM (Legacy)
|
||||
|
||||
LLM refers to the legacy text-completion models that preceded chat models. See a [usage example](http://python.langchain.com/docs/integrations/llms/openai).
|
||||
|
||||
```python
|
||||
from langchain_openai import OpenAI
|
||||
```
|
||||
|
||||
If you are using a model hosted on `Azure`, you should use different wrapper for that:
|
||||
```python
|
||||
from langchain_openai import AzureOpenAI
|
||||
```
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](http://python.langchain.com/docs/integrations/llms/azure_openai)
|
||||
|
Loading…
Reference in New Issue
Block a user