Class OpenAiLanguageModel
java.lang.Object
dev.langchain4j.model.openai.OpenAiLanguageModel
- All Implemented Interfaces:
LanguageModel
Represents an OpenAI language model with a completion interface, such as gpt-3.5-turbo-instruct.
However, it's recommended to use
OpenAiChatModel instead,
as it offers more advanced features like function calling, multi-turn conversations, etc.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructing instances ofOpenAiLanguageModel. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LanguageModel
generate
-
Constructor Details
-
OpenAiLanguageModel
-
-
Method Details
-
modelName
-
generate
Description copied from interface:LanguageModelGenerate a response to the given prompt.- Specified by:
generatein interfaceLanguageModel- Parameters:
prompt- the prompt.- Returns:
- the response.
-
builder
-