| Package | Description |
|---|---|
| dev.langchain4j.data.message | |
| dev.langchain4j.model.chat | |
| dev.langchain4j.model.input |
| Modifier and Type | Method and Description |
|---|---|
static AiMessage |
AiMessage.aiMessage(List<ToolExecutionRequest> toolExecutionRequests) |
static AiMessage |
AiMessage.aiMessage(String text) |
static AiMessage |
AiMessage.aiMessage(ToolExecutionRequest... toolExecutionRequests) |
static AiMessage |
AiMessage.from(List<ToolExecutionRequest> toolExecutionRequests) |
static AiMessage |
AiMessage.from(String text) |
static AiMessage |
AiMessage.from(ToolExecutionRequest... toolExecutionRequests) |
| Modifier and Type | Method and Description |
|---|---|
default Response<AiMessage> |
ChatLanguageModel.generate(ChatMessage... messages)
Generates a response from the model based on a sequence of messages.
|
Response<AiMessage> |
ChatLanguageModel.generate(List<ChatMessage> messages)
Generates a response from the model based on a sequence of messages.
|
default Response<AiMessage> |
ChatLanguageModel.generate(List<ChatMessage> messages,
List<ToolSpecification> toolSpecifications)
Generates a response from the model based on a list of messages and a list of tool specifications.
|
default Response<AiMessage> |
ChatLanguageModel.generate(List<ChatMessage> messages,
ToolSpecification toolSpecification)
Generates a response from the model based on a list of messages and a single tool specification.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
StreamingChatLanguageModel.generate(List<ChatMessage> messages,
List<ToolSpecification> toolSpecifications,
StreamingResponseHandler<AiMessage> handler)
Generates a response from the model based on a list of messages and a list of tool specifications.
|
void |
StreamingChatLanguageModel.generate(List<ChatMessage> messages,
StreamingResponseHandler<AiMessage> handler)
Generates a response from the model based on a sequence of messages.
|
default void |
StreamingChatLanguageModel.generate(List<ChatMessage> messages,
ToolSpecification toolSpecification,
StreamingResponseHandler<AiMessage> handler) |
default void |
StreamingChatLanguageModel.generate(String userMessage,
StreamingResponseHandler<AiMessage> handler)
Generates a response from the model based on a message from a user.
|
| Modifier and Type | Method and Description |
|---|---|
AiMessage |
Prompt.toAiMessage() |
Copyright © 2023. All rights reserved.