Skip to main content

An integration package connecting OpenAI and GigaChain

Project description

langchain-openai

This package contains the LangChain integrations for OpenAI through their openai SDK.

Installation and Setup

  • Install the LangChain partner package
pip install gigachain-openai
  • Get an OpenAI api key and set it as an environment variable (OPENAI_API_KEY)

LLM

See a usage example.

from langchain_openai import OpenAI

If you are using a model hosted on Azure, you should use different wrapper for that:

from langchain_openai import AzureOpenAI

For a more detailed walkthrough of the Azure wrapper, see here

Chat model

See a usage example.

from langchain_openai import ChatOpenAI

If you are using a model hosted on Azure, you should use different wrapper for that:

from langchain_openai import AzureChatOpenAI

For a more detailed walkthrough of the Azure wrapper, see here

Text Embedding Model

See a usage example

from langchain_openai import OpenAIEmbeddings

If you are using a model hosted on Azure, you should use different wrapper for that:

from langchain_openai import AzureOpenAIEmbeddings

For a more detailed walkthrough of the Azure wrapper, see here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gigachain_openai-0.1.21rc2.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

gigachain_openai-0.1.21rc2-py3-none-any.whl (49.8 kB view details)

Uploaded Python 3

File details

Details for the file gigachain_openai-0.1.21rc2.tar.gz.

File metadata

  • Download URL: gigachain_openai-0.1.21rc2.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/23.5.0

File hashes

Hashes for gigachain_openai-0.1.21rc2.tar.gz
Algorithm Hash digest
SHA256 acd10123ca96fefad62b1f62ee1155998a596a5ff7837fd4246926d77c326a5e
MD5 6afbf85eb77aea40e93dd12cd72a828e
BLAKE2b-256 3efbed3a2811670924a89bd693c6dbcb87d79e6009235e1fde319e922f665307

See more details on using hashes here.

File details

Details for the file gigachain_openai-0.1.21rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for gigachain_openai-0.1.21rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 8222f791946d83544a6282f138122248596aa8f12dcc2420316eb60e8b23a956
MD5 bce78123d70b695f33d4b3db8f7cc3ae
BLAKE2b-256 c446e876b35d5973c127f211e529555803a356a3d4c62a56291e423427adeef9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page