Package dev.langchain4j.model.openai
package dev.langchain4j.model.openai
-
ClassDescriptionRepresents an OpenAI language model with a chat completion interface, such as gpt-3.5-turbo and gpt-4.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
.Deprecated, for removal: This API element is subject to removal in a future version.Represents an OpenAI moderation model, such as text-moderation-latest.Represents an OpenAI language model with a chat completion interface, such as gpt-3.5-turbo and gpt-4.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 or when using streaming.
OpenAiChatModelName
,OpenAiEmbeddingModelName
OpenAiImageModelName
,OpenAiLanguageModelName
,OpenAiModerationModelName