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.13.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

gigachain_openai-0.1.13-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file gigachain_openai-0.1.13.tar.gz.

File metadata

  • Download URL: gigachain_openai-0.1.13.tar.gz
  • Upload date:
  • Size: 39.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.13.tar.gz
Algorithm Hash digest
SHA256 ffb18bdaf84e0c0cfbac144423e435067b044a7ee72eca5534205990a199f4ff
MD5 48bc69b62fcd02c1d7769a48ead02b2d
BLAKE2b-256 3923863c3f124b02b8371b604395d0dd2e917272ad562578c9ed85f4ec890eeb

See more details on using hashes here.

File details

Details for the file gigachain_openai-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for gigachain_openai-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 fb4f9066831ca512c94c2d0f5760f21730c5c4fb0f74fc48fa645c2eda964646
MD5 737ff03921dd98fc9060205588ae6f99
BLAKE2b-256 f47af50a4d63989191cfb919bef2b9fb0f892bf5c1545dca56ecdffec56c7f5b

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