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

Uploaded Source

Built Distribution

gigachain_openai-0.1.20-py3-none-any.whl (48.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gigachain_openai-0.1.20.tar.gz
  • Upload date:
  • Size: 42.3 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.20.tar.gz
Algorithm Hash digest
SHA256 c55bbb74379751ad9c99a1907465192da9116198df3eee9af0f7c000f4163a13
MD5 7bb5fbdcfd97491e412c133738c21963
BLAKE2b-256 beb7c1108a770cc20cadd3b729c687b008a3d36cdc0ea91dfad0e637654ee7d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gigachain_openai-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 9565d0363c7c0c045dffa291debd4829120f28a04129e2de506b979781a63359
MD5 24ae0b52574ed38ee91f7c70a53229b2
BLAKE2b-256 9454471c190fd7532f248bbd847d1c73ea754ef0b82e414dafc1d7193c50c865

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