# 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 gigachain-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/ai-forever/gigachain",
"name": "gigachain-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/8c/06/06d2e7806bcaa9bd9d75ab06136b16c92d3f1a68e1755d437020cd309020/gigachain_openai-0.1.22.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 gigachain-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)",
"bugtrack_url": null,
"license": "MIT",
"summary": "An integration package connecting OpenAI and LangChain",
"version": "0.1.22",
"project_urls": {
"Homepage": "https://github.com/ai-forever/gigachain",
"Release Notes": "https://github.com/ai-forever/gigachain/releases?q=tag%3A%22gigachain-openai%3D%3D0%22&expanded=true",
"Repository": "https://github.com/ai-forever/gigachain",
"Source Code": "https://github.com/ai-forever/gigachain/tree/master/libs/partners/openai"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "99facec91ef2c92a1acd989fb1b04953a9d85463c3d0f0470fce509f6c2f0cda",
"md5": "f235e27021cee2dc9f1cd4414bcb32df",
"sha256": "d07a896bd61903a7abc0e7542fb8a306e5b077e3381a3df636f0eb0bdc3c8fcf"
},
"downloads": -1,
"filename": "gigachain_openai-0.1.22-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f235e27021cee2dc9f1cd4414bcb32df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 51978,
"upload_time": "2024-08-28T09:44:35",
"upload_time_iso_8601": "2024-08-28T09:44:35.834929Z",
"url": "https://files.pythonhosted.org/packages/99/fa/cec91ef2c92a1acd989fb1b04953a9d85463c3d0f0470fce509f6c2f0cda/gigachain_openai-0.1.22-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8c0606d2e7806bcaa9bd9d75ab06136b16c92d3f1a68e1755d437020cd309020",
"md5": "70bd1f1345e6faf2cb2fd98af44dd917",
"sha256": "df72510210497a3d58baf306202054547c337b36c5ec793f72305b4b36b2541f"
},
"downloads": -1,
"filename": "gigachain_openai-0.1.22.tar.gz",
"has_sig": false,
"md5_digest": "70bd1f1345e6faf2cb2fd98af44dd917",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 45580,
"upload_time": "2024-08-28T09:44:36",
"upload_time_iso_8601": "2024-08-28T09:44:36.869305Z",
"url": "https://files.pythonhosted.org/packages/8c/06/06d2e7806bcaa9bd9d75ab06136b16c92d3f1a68e1755d437020cd309020/gigachain_openai-0.1.22.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-28 09:44:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ai-forever",
"github_project": "gigachain",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gigachain-openai"
}