Skip to main content

OpenAI

All functionality related to OpenAI

OpenAI is American artificial intelligence (AI) research laboratory consisting of the non-profit OpenAI Incorporated and its for-profit subsidiary corporation OpenAI Limited Partnership. OpenAI conducts AI research with the declared intention of promoting and developing a friendly AI. OpenAI systems run on an Azure-based supercomputing platform from Microsoft.

The OpenAI API is powered by a diverse set of models with different capabilities and price points.

ChatGPT is the Artificial Intelligence (AI) chatbot developed by OpenAI.

Installation and Setup

  • Get an OpenAI api key and set it as an environment variable (OPENAI_API_KEY)

LLM

See a usage example.

npm install @langchain/openai
import { OpenAI } from "@langchain/openai";

Chat model

See a usage example.

import { ChatOpenAI } from "@langchain/openai";

Text Embedding Model

See a usage example

import { OpenAIEmbeddings } from "@langchain/openai";

Retriever

See a usage example.

import { ChatGPTPluginRetriever } from "langchain/retrievers/remote";

Chain

import { OpenAIModerationChain } from "langchain/chains";

Help us out by providing feedback on this documentation page: