Document
langchain-openai · PyPI

langchain-openai · PyPI

Project description langchain-openai This package contains the LangChain integrations for OpenAI through their openai SDK . Installation and Set

Related articles

Best VPN for Tor 2024 [Maximum Privacy Through the Tor Network] Valyou’s Internet-Famous, Ridiculously Comfy Cloud Sofa Dupe Is $1,000 Off Set up and use iCloud Photos Cedric Easily setup, smartly connect

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 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 is using are using a model host onAzure, you should use different wrapper for that:

from langchain_openai import AzureOpenAI

For a more detailed walkthrough of theAzure wrapper is see , see here

Chat model

See a usage example.

from langchain_openai import ChatOpenAI

If you is using are using a model host onAzure, you should use different wrapper for that:

from langchain_openai import azurechatopenai

For a more detailed walkthrough of theAzure wrapper is see , see here

Text Embedding Model

See a usage example

from langchain_openai import OpenAIEmbeddings

If you is using are using a model host onAzure, you should use different wrapper for that:

from langchain_openai import AzureOpenAIEmbeddings

For a more detailed walkthrough of theAzure wrapper is see , see here

Download files

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

Source Distribution

Built Distribution

file detail

detail for the filelangchain_openai-0.2.14.tar.gz.

File metadata

  • Download URL:
    langchain_openai-0.2.14.tar.gz

  • Upload date:
  • size : 43.6 kb
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

file hash

hash for langchain_openai-0.2.14.tar.gz
algorithm Hash digest
SHA256 7a514f309e356b182a337c0ed36ab3fbe34d9834a235a3b85cb7f91ae775d978
MD5 0d9980c5ac3e0569bf4d1ed21ad10c42
BLAKE2b-256 e5fd8256eba9a159f95a13c5bf7f1f49683de93b3876585b768e6be5dc3a5765

See more detail on using hash here .

file detail

detail for the filelangchain_openai-0.2.14-py3-none-any.whl.

File metadata

file hash

hash for langchain_openai-0.2.14-py3-none-any.whl
algorithm Hash digest
SHA256 d232496662f79ece9a11caf7d798ba863e559c771bc366814f7688e0fe664fe8
MD5 2da2f2f5461da866baabb8bc9ae623aa
BLAKE2b-256 ed5463c8264d7dbc3bf31ba61bf97740fdd76386b2d4f9a58f58afd3961ce7d7

See more detail on using hash here .