Package dev.langchain4j.model.openai
package dev.langchain4j.model.openai
-
ClassDescriptionRepresents an OpenAI audio model with a transcription interface, only gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1 (which is powered by our open source Whisper V2 model), and gpt-4o-transcribe-diarize are supported.Represents an OpenAI language model with a chat completion interface, such as gpt-4o-mini and o3.Represents an OpenAI embedding model, such as text-embedding-ada-002.Represents an OpenAI DALLĀ·E models to generate artistic images.Represents an OpenAI language model with a completion interface, such as gpt-3.5-turbo-instruct.Builder class for constructing instances of
OpenAiLanguageModel.OpenAI implementation ofModelCatalog.Represents an OpenAI moderation model, such as text-moderation-latest.Represents an OpenAI language model with a chat completion interface, such as gpt-4o-mini and o3.Represents an OpenAI language model with a completion interface, such as gpt-3.5-turbo-instruct.This class needs to be thread safe because it is called when a streaming result comes back and there is no guarantee that this thread will be the same as the one that initiated the request, in fact it almost certainly won't be.This class can be used to estimate the cost (in tokens) before calling OpenAI.