Name | langchain-openai JSON |
Version |
0.3.35
JSON |
| download |
home_page | None |
Summary | An integration package connecting OpenAI and LangChain |
upload_time | 2025-10-06 15:09:28 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4.0.0,>=3.9.0 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# langchain-openai
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)
Raw data
{
"_id": null,
"home_page": null,
"name": "langchain-openai",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.9.0",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fb/96/06d0d25a37e05a0ff2d918f0a4b0bf0732aed6a43b472b0b68426ce04ef8/langchain_openai-0.3.35.tar.gz",
"platform": null,
"description": "# langchain-openai\n\nThis package contains the LangChain integrations for OpenAI through their `openai` SDK.\n\n## Installation and Setup\n\n- Install the LangChain partner package\n\n```bash\npip install langchain-openai\n```\n\n- Get an OpenAI api key and set it as an environment variable (`OPENAI_API_KEY`)\n\n## Chat model\n\nSee a [usage example](https://python.langchain.com/docs/integrations/chat/openai).\n\n```python\nfrom langchain_openai import ChatOpenAI\n```\n\nIf you are using a model hosted on `Azure`, you should use different wrapper for that:\n\n```python\nfrom langchain_openai import AzureChatOpenAI\n```\n\nFor a more detailed walkthrough of the `Azure` wrapper, see [AzureChatOpenAI](https://python.langchain.com/docs/integrations/chat/azure_chat_openai)\n\n## Text Embedding Model\n\nSee a [usage example](https://python.langchain.com/docs/integrations/text_embedding/openai)\n\n```python\nfrom langchain_openai import OpenAIEmbeddings\n```\n\nIf you are using a model hosted on `Azure`, you should use different wrapper for that:\n\n```python\nfrom langchain_openai import AzureOpenAIEmbeddings\n```\n\nFor a more detailed walkthrough of the `Azure` wrapper, see [AzureOpenAIEmbeddings](https://python.langchain.com/docs/integrations/text_embedding/azureopenai)\n\n## LLM (Legacy)\n\nLLM refers to the legacy text-completion models that preceded chat models. See a [usage example](https://python.langchain.com/docs/integrations/llms/openai).\n\n```python\nfrom langchain_openai import OpenAI\n```\n\nIf you are using a model hosted on `Azure`, you should use different wrapper for that:\n\n```python\nfrom langchain_openai import AzureOpenAI\n```\n\nFor a more detailed walkthrough of the `Azure` wrapper, see [Azure OpenAI](https://python.langchain.com/docs/integrations/llms/azure_openai)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An integration package connecting OpenAI and LangChain",
"version": "0.3.35",
"project_urls": {
"Release Notes": "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-openai%3D%3D0%22&expanded=true",
"Source Code": "https://github.com/langchain-ai/langchain/tree/master/libs/partners/openai",
"repository": "https://github.com/langchain-ai/langchain"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d8d5c90c5478215c20ee71d8feaf676f7ffd78d0568f8c98bd83f81ce7562ed7",
"md5": "5cc824a4badcb25bbe21c98c42734f95",
"sha256": "76d5707e6e81fd461d33964ad618bd326cb661a1975cef7c1cb0703576bdada5"
},
"downloads": -1,
"filename": "langchain_openai-0.3.35-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5cc824a4badcb25bbe21c98c42734f95",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.0",
"size": 75952,
"upload_time": "2025-10-06T15:09:27",
"upload_time_iso_8601": "2025-10-06T15:09:27.137934Z",
"url": "https://files.pythonhosted.org/packages/d8/d5/c90c5478215c20ee71d8feaf676f7ffd78d0568f8c98bd83f81ce7562ed7/langchain_openai-0.3.35-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fb9606d0d25a37e05a0ff2d918f0a4b0bf0732aed6a43b472b0b68426ce04ef8",
"md5": "e8b0f2124bd26e03a7e5f9bd9e9c91b6",
"sha256": "fa985fd041c3809da256a040c98e8a43e91c6d165b96dcfeb770d8bd457bf76f"
},
"downloads": -1,
"filename": "langchain_openai-0.3.35.tar.gz",
"has_sig": false,
"md5_digest": "e8b0f2124bd26e03a7e5f9bd9e9c91b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.0",
"size": 786635,
"upload_time": "2025-10-06T15:09:28",
"upload_time_iso_8601": "2025-10-06T15:09:28.463633Z",
"url": "https://files.pythonhosted.org/packages/fb/96/06d0d25a37e05a0ff2d918f0a4b0bf0732aed6a43b472b0b68426ce04ef8/langchain_openai-0.3.35.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-06 15:09:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "langchain-ai",
"github_project": "langchain",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "langchain-openai"
}