mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 11:55:21 +00:00
docs[patch]: Add caution on OpenAI LLMs integration page (#22754)
@baskaryan do we like? <img width="1040" alt="Screenshot 2024-06-10 at 12 16 45 PM" src="https://github.com/langchain-ai/langchain/assets/6952323/8893063f-1acf-4a56-9ee5-a8a2b1560277">
This commit is contained in:
parent
c3cce98d86
commit
e4183cbc4e
@ -23,13 +23,11 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "raw",
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "d83ba7de",
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "raw"
|
||||
}
|
||||
},
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install -qU langchain-openai"
|
||||
]
|
||||
|
@ -7,7 +7,13 @@
|
||||
"source": [
|
||||
"# Azure OpenAI\n",
|
||||
"\n",
|
||||
"This notebook goes over how to use Langchain with [Azure OpenAI](https://aka.ms/azure-openai).\n",
|
||||
":::caution\n",
|
||||
"You are currently on a page documenting the use of Azure OpenAI [text completion models](/docs/concepts/#llms). The latest and most popular Azure OpenAI models are [chat completion models](/docs/concepts/#chat-models).\n",
|
||||
"\n",
|
||||
"Unless you are specifically using `gpt-3.5-turbo-instruct`, you are probably looking for [this page instead](/docs/integrations/chat/azure_chat_openai/).\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"This page goes over how to use LangChain with [Azure OpenAI](https://aka.ms/azure-openai).\n",
|
||||
"\n",
|
||||
"The Azure OpenAI API is compatible with OpenAI's API. The `openai` Python package makes it easy to use both OpenAI and Azure OpenAI. You can call Azure OpenAI the same way you call OpenAI with the exceptions noted below.\n",
|
||||
"\n",
|
||||
|
@ -7,6 +7,12 @@
|
||||
"source": [
|
||||
"# OpenAI\n",
|
||||
"\n",
|
||||
":::caution\n",
|
||||
"You are currently on a page documenting the use of OpenAI [text completion models](/docs/concepts/#llms). The latest and most popular OpenAI models are [chat completion models](/docs/concepts/#chat-models).\n",
|
||||
"\n",
|
||||
"Unless you are specifically using `gpt-3.5-turbo-instruct`, you are probably looking for [this page instead](/docs/integrations/chat/openai/).\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"[OpenAI](https://platform.openai.com/docs/introduction) offers a spectrum of models with different levels of power suitable for different tasks.\n",
|
||||
"\n",
|
||||
"This example goes over how to use LangChain to interact with `OpenAI` [models](https://platform.openai.com/docs/models)"
|
||||
|
@ -6,24 +6,6 @@ keywords: [azure]
|
||||
|
||||
All functionality related to `Microsoft Azure` and other `Microsoft` products.
|
||||
|
||||
## LLMs
|
||||
|
||||
### Azure ML
|
||||
|
||||
See a [usage example](/docs/integrations/llms/azure_ml).
|
||||
|
||||
```python
|
||||
from langchain_community.llms.azureml_endpoint import AzureMLOnlineEndpoint
|
||||
```
|
||||
|
||||
### Azure OpenAI
|
||||
|
||||
See a [usage example](/docs/integrations/llms/azure_openai).
|
||||
|
||||
```python
|
||||
from langchain_openai import AzureOpenAI
|
||||
```
|
||||
|
||||
## Chat Models
|
||||
### Azure OpenAI
|
||||
|
||||
@ -51,6 +33,24 @@ See a [usage example](/docs/integrations/chat/azure_chat_openai)
|
||||
from langchain_openai import AzureChatOpenAI
|
||||
```
|
||||
|
||||
## LLMs
|
||||
|
||||
### Azure ML
|
||||
|
||||
See a [usage example](/docs/integrations/llms/azure_ml).
|
||||
|
||||
```python
|
||||
from langchain_community.llms.azureml_endpoint import AzureMLOnlineEndpoint
|
||||
```
|
||||
|
||||
### Azure OpenAI
|
||||
|
||||
See a [usage example](/docs/integrations/llms/azure_openai).
|
||||
|
||||
```python
|
||||
from langchain_openai import AzureOpenAI
|
||||
```
|
||||
|
||||
## Embedding Models
|
||||
### Azure OpenAI
|
||||
|
||||
|
@ -25,6 +25,19 @@ pip install langchain-openai
|
||||
|
||||
Get an OpenAI api key and set it as an environment variable (`OPENAI_API_KEY`)
|
||||
|
||||
## Chat model
|
||||
|
||||
See a [usage example](/docs/integrations/chat/openai).
|
||||
|
||||
```python
|
||||
from langchain_openai import ChatOpenAI
|
||||
```
|
||||
|
||||
If you are using a model hosted on `Azure`, you should use different wrapper for that:
|
||||
```python
|
||||
from langchain_openai import AzureChatOpenAI
|
||||
```
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/chat/azure_chat_openai).
|
||||
|
||||
## LLM
|
||||
|
||||
@ -38,21 +51,7 @@ If you are using a model hosted on `Azure`, you should use different wrapper for
|
||||
```python
|
||||
from langchain_openai import AzureOpenAI
|
||||
```
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/llms/azure_openai)
|
||||
|
||||
## Chat model
|
||||
|
||||
See a [usage example](/docs/integrations/chat/openai).
|
||||
|
||||
```python
|
||||
from langchain_openai import ChatOpenAI
|
||||
```
|
||||
|
||||
If you are using a model hosted on `Azure`, you should use different wrapper for that:
|
||||
```python
|
||||
from langchain_openai import AzureChatOpenAI
|
||||
```
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/chat/azure_chat_openai)
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/llms/azure_openai).
|
||||
|
||||
## Embedding Model
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user