Skip to main content

An integration package connecting OpenAI and Aibaba AI

Project description

langchain-openai

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

Installation and Setup

  • Install the Aibaba AI partner package
pip install langchain-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

aibaba_ai_openai-0.2.14.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aibaba_ai_openai-0.2.14-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file aibaba_ai_openai-0.2.14.tar.gz.

File metadata

  • Download URL: aibaba_ai_openai-0.2.14.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for aibaba_ai_openai-0.2.14.tar.gz
Algorithm Hash digest
SHA256 1e3c7169097462c2aa6c01801c1739517ecfc6e29a6c88b2cff72a7662998996
MD5 e01ef9d4a88abf87c5c4e9b59cece60b
BLAKE2b-256 b08f348eb20f22465bb79bd39650d75f0f106a04d4e952612f79376d026ba16f

See more details on using hashes here.

File details

Details for the file aibaba_ai_openai-0.2.14-py3-none-any.whl.

File metadata

  • Download URL: aibaba_ai_openai-0.2.14-py3-none-any.whl
  • Upload date:
  • Size: 51.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for aibaba_ai_openai-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 cd729b1de7ab32e00c695c0d93c394cd44250da9f0a4153406ae77a150e626b6
MD5 6587dc210ea4998905f20189baea8805
BLAKE2b-256 c4ab6f767ac3ac1f4da2ac58488f00e38b2f7624d269f8bd96e42f5dbc6546ad

See more details on using hashes here.

Supported by

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