langchain-openai


Namelangchain-openai JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/langchain-ai/langchain
SummaryAn integration package connecting OpenAI and LangChain
upload_time2024-05-15 19:48:51
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.8.1
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.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/26/ed/11ce0a48661122827986aeedb407394d5dd7301e9ccb5e1e00b4d622073c/langchain_openai-0.1.7.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.1.7",
    "project_urls": {
        "Homepage": "https://github.com/langchain-ai/langchain",
        "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": "102743f785670a340363fe46e2893a80293fa12448584f19ba4f9e6d03673552",
                "md5": "269009d74156a688adaeb7a7da8043be",
                "sha256": "39c3cb22bb739900ae8294d4d9939a6138c0ca7ad11198e57038eb14c08d04ec"
            },
            "downloads": -1,
            "filename": "langchain_openai-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "269009d74156a688adaeb7a7da8043be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 34422,
            "upload_time": "2024-05-15T19:48:49",
            "upload_time_iso_8601": "2024-05-15T19:48:49.641328Z",
            "url": "https://files.pythonhosted.org/packages/10/27/43f785670a340363fe46e2893a80293fa12448584f19ba4f9e6d03673552/langchain_openai-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26ed11ce0a48661122827986aeedb407394d5dd7301e9ccb5e1e00b4d622073c",
                "md5": "3a116a6b4a1449b8b87b8abb98274822",
                "sha256": "fd7e1c33ba8e2cab4b2154f3a2fd4a0d9cc6518b41cf49bb87255f9f732a4896"
            },
            "downloads": -1,
            "filename": "langchain_openai-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3a116a6b4a1449b8b87b8abb98274822",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 28055,
            "upload_time": "2024-05-15T19:48:51",
            "upload_time_iso_8601": "2024-05-15T19:48:51.238642Z",
            "url": "https://files.pythonhosted.org/packages/26/ed/11ce0a48661122827986aeedb407394d5dd7301e9ccb5e1e00b4d622073c/langchain_openai-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 19:48:51",
    "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.34119s