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.21rc1.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

gigachain_openai-0.1.21rc1-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gigachain_openai-0.1.21rc1.tar.gz
  • Upload date:
  • Size: 42.8 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.21rc1.tar.gz
Algorithm Hash digest
SHA256 43cfd51d35c76ecb42568c9bf0dff4be8ada12afa132f921ff063daddfdb09b3
MD5 51bb7f2bd5c4424ac750c4d19e06b93f
BLAKE2b-256 4c7bd71b9cb9773df2bae5a0a0855d2d671af7344082b7f0f2a07712736b1683

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gigachain_openai-0.1.21rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1742496ba98c1e383a59262f5d992179e1b271af3bed5500ee837dd30035460
MD5 48a896cc1a36d2d287fefc3c8e90b912
BLAKE2b-256 c33f1fe3f07484b2c8e94aef0d3a7f26f8e1c5950c0038a481d8f1ec9fc4db7a

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