Class ScriptedChatModel.Answer

java.lang.Object
io.micronaut.langchain4j.test.ScriptedChatModel.Answer
Enclosing class:
ScriptedChatModel

public static final class ScriptedChatModel.Answer extends Object
The answer of a rule.
Since:
2.4.0
  • Method Details

    • respond

      public ScriptedChatModel.Builder respond(String response)
      Parameters:
      response - The text of the response
      Returns:
      The builder
    • respond

      public ScriptedChatModel.Builder respond(Function<dev.langchain4j.model.chat.request.ChatRequest, String> response)
      Parameters:
      response - The text of the response, from the request
      Returns:
      The builder
    • callTool

      public ScriptedChatModel.Builder callTool(String toolName, String arguments)
      Parameters:
      toolName - The name of the tool to execute
      arguments - The arguments of the tool, as JSON
      Returns:
      The builder