Class ServingModel

java.lang.Object
com.axelor.ai.chat.ServingModel

public final class ServingModel extends Object
The model a turn is served by: what data sent in the turn goes to.
  • Method Details

    • of

      public static AiModel of(String chosen, AiAgent agent)
      The model the user chose, else the agent's own, else the default chat model; null when the chosen code names no model a user may choose (see choosable(com.axelor.ai.db.AiModel)) or there is none at all.
      Parameters:
      chosen - the model code the request carries, or null
      agent - the agent answering, or null
    • choosable

      public static boolean choosable(AiModel model)
      Whether a user may choose this model for a chat: the models the picker lists ( ChatResource.listModels). The request names a model by code, so the list alone keeps out nothing: an internal model, kept for a utility task or a program, or one that is not a chat model at all, would otherwise answer for anyone who typed its code.