langchain-openai


Namelangchain-openai JSON
Version 0.2.13 PyPI version JSON
download
home_pagehttps://github.com/langchain-ai/langchain
SummaryAn integration package connecting OpenAI and LangChain
upload_time2024-12-18 22:17:34
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.9
licenseMIT
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`)


## 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).

```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](http://python.langchain.com/docs/integrations/chat/azure_chat_openai)


## Text Embedding Model

See a [usage example](http://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 [here](https://python.langchain.com/docs/integrations/text_embedding/azureopenai)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/langchain-ai/langchain",
    "name": "langchain-openai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ed/2b/dd9d51e069dc8c620ef643da48b406bcfcd6123571d9fa9e25f846cde232/langchain_openai-0.2.13.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```bash\npip install langchain-openai\n```\n- Get an OpenAI api key and set it as an environment variable (`OPENAI_API_KEY`)\n\n\n## LLM\n\nSee a [usage example](http://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```python\nfrom langchain_openai import AzureOpenAI\n```\nFor a more detailed walkthrough of the `Azure` wrapper, see [here](http://python.langchain.com/docs/integrations/llms/azure_openai)\n\n\n## Chat model\n\nSee a [usage example](http://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```python\nfrom langchain_openai import AzureChatOpenAI\n```\nFor a more detailed walkthrough of the `Azure` wrapper, see [here](http://python.langchain.com/docs/integrations/chat/azure_chat_openai)\n\n\n## Text Embedding Model\n\nSee a [usage example](http://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```python\nfrom langchain_openai import AzureOpenAIEmbeddings\n```\nFor a more detailed walkthrough of the `Azure` wrapper, see [here](https://python.langchain.com/docs/integrations/text_embedding/azureopenai)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An integration package connecting OpenAI and LangChain",
    "version": "0.2.13",
    "project_urls": {
        "Homepage": "https://github.com/langchain-ai/langchain",
        "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",
        "Source Code": "https://github.com/langchain-ai/langchain/tree/master/libs/partners/openai"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad1360ba429572b3d8c569a7df61d27d53c0378df0dad7499929d81e3663ed5c",
                "md5": "d1c3a39dba3f247281fbcbd287d49b01",
                "sha256": "4b0707694b5081b474e0d8313572fbe611de0df82cf4659068ed20ccb629d1f8"
            },
            "downloads": -1,
            "filename": "langchain_openai-0.2.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d1c3a39dba3f247281fbcbd287d49b01",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 50738,
            "upload_time": "2024-12-18T22:17:32",
            "upload_time_iso_8601": "2024-12-18T22:17:32.459868Z",
            "url": "https://files.pythonhosted.org/packages/ad/13/60ba429572b3d8c569a7df61d27d53c0378df0dad7499929d81e3663ed5c/langchain_openai-0.2.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed2bdd9d51e069dc8c620ef643da48b406bcfcd6123571d9fa9e25f846cde232",
                "md5": "d966d90389a91f88a0189214c7a3bd63",
                "sha256": "5b0eb9c7ab3f46ba7b5a53337e76586fb89b67475a465f3e3f0ab40a2f94235d"
            },
            "downloads": -1,
            "filename": "langchain_openai-0.2.13.tar.gz",
            "has_sig": false,
            "md5_digest": "d966d90389a91f88a0189214c7a3bd63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 43500,
            "upload_time": "2024-12-18T22:17:34",
            "upload_time_iso_8601": "2024-12-18T22:17:34.904412Z",
            "url": "https://files.pythonhosted.org/packages/ed/2b/dd9d51e069dc8c620ef643da48b406bcfcd6123571d9fa9e25f846cde232/langchain_openai-0.2.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 22:17:34",
    "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"
}
        
Elapsed time: 0.45935s