Package com.axelor.ai.chat.provider
Class StreamingChatModelFactory
java.lang.Object
com.axelor.ai.chat.provider.StreamingChatModelFactory
Builds a LangChain4j
StreamingChatModel from the DB-stored provider/model/agent config.
Request/response logging is controlled via axelor-config.properties:
ai.logging.requests = true ai.logging.responses = true
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.model.chat.StreamingChatModelcreate(AiProvider provider, AiModel model, AiAgent agent) A streaming model is always for a reply someone is waiting on — a chat turn, or a workflow step holding the request that saved its record — so it runs at the standard tier.static IntegerreplyTokens(AiProviderType type, AiModel model, AiAgent agent) The most tokens a reply may take, as the request asks for them: the agent's limit, else the model's, else on Anthropic theANTHROPIC_MAX_TOKENSits API requires; null where the provider's own default applies.
-
Constructor Details
-
StreamingChatModelFactory
public StreamingChatModelFactory()
-
-
Method Details
-
replyTokens
The most tokens a reply may take, as the request asks for them: the agent's limit, else the model's, else on Anthropic theANTHROPIC_MAX_TOKENSits API requires; null where the provider's own default applies. -
create
public dev.langchain4j.model.chat.StreamingChatModel create(AiProvider provider, AiModel model, AiAgent agent) A streaming model is always for a reply someone is waiting on — a chat turn, or a workflow step holding the request that saved its record — so it runs at the standard tier.
-