mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
chore: enrich pyproject.toml files with links to new references, others (#33343)
This commit is contained in:
@@ -2,60 +2,4 @@
|
||||
|
||||
This package contains the LangChain integrations for OpenAI through their `openai` SDK.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
- Install the LangChain partner package
|
||||
|
||||
```bash
|
||||
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](https://python.langchain.com/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 [AzureChatOpenAI](https://python.langchain.com/docs/integrations/chat/azure_chat_openai)
|
||||
|
||||
## Text Embedding Model
|
||||
|
||||
See a [usage example](https://python.langchain.com/docs/integrations/text_embedding/openai)
|
||||
|
||||
```python
|
||||
from langchain_openai import OpenAIEmbeddings
|
||||
```
|
||||
|
||||
If you are using a model hosted on `Azure`, you should use different wrapper for that:
|
||||
|
||||
```python
|
||||
from langchain_openai import AzureOpenAIEmbeddings
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the `Azure` wrapper, see [AzureOpenAIEmbeddings](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](https://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 [Azure OpenAI](https://python.langchain.com/docs/integrations/llms/azure_openai)
|
||||
View the [documentation](https://docs.langchain.com/oss/python/integrations/providers/openai) for more details.
|
||||
|
||||
@@ -17,9 +17,13 @@ description = "An integration package connecting OpenAI and LangChain"
|
||||
readme = "README.md"
|
||||
|
||||
[project.urls]
|
||||
"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/openai"
|
||||
"Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-openai%3D%3D0%22&expanded=true"
|
||||
repository = "https://github.com/langchain-ai/langchain"
|
||||
homepage = "https://docs.langchain.com/oss/python/integrations/providers/openai"
|
||||
repository = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/openai"
|
||||
changelog = "https://github.com/langchain-ai/langchain/releases?q=%22langchain-openai%22"
|
||||
docs = "https://reference.langchain.com/python/integrations/langchain_openai/"
|
||||
twitter = "https://x.com/LangChainAI"
|
||||
slack = "https://www.langchain.com/join-community"
|
||||
reddit = "https://www.reddit.com/r/LangChain/"
|
||||
|
||||
[dependency-groups]
|
||||
test = [
|
||||
|
||||
Reference in New Issue
Block a user