Class ChatModelRoutingRequest

java.lang.Object
dev.langchain4j.model.chat.router.ChatModelRoutingRequest

@Experimental public final class ChatModelRoutingRequest extends Object
The input of a ChatModelRouter: the chat request to route, the routes that can handle it and the options of the call.
Since:
1.21.0
  • Method Details

    • chatRequest

      public ChatRequest chatRequest()
      The chat request to route.
    • routes

      public List<ChatModelRoute> routes()
      The routes that can handle the request, in the order in which they were configured: all routes or, if the request needs a capability (such as a JSON schema response format), the routes whose model supports it.
    • options

      public ChatRequestOptions options()
      The options of the call, for example listener attributes identifying the user or the tenant. ChatRequestOptions.EMPTY if the call has none.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static ChatModelRoutingRequest.Builder builder()