Class SkillPlugin
- All Implemented Interfaces:
ChatPlugin
use_skill returns the skill's content as its result, so a loaded skill lives in the
conversation at the point it was loaded. The catalog is therefore the same every turn, and a
provider can cache everything after it.
A use_skill result that carries no content — recorded before results did, or cleared —
is backfilled from the database, so such a skill stays loaded. ContextWindowPlugin
exempts use_skill results from output compression for the same reason.
Priority 35: runs after KnowledgePlugin (30) and before ToolExecutorPlugin (40).
-
Method Summary
Modifier and TypeMethodDescriptiondecorateProvider(ChatRequest request, ChatProvider provider) Wraps the provider to intercept or enrich LLM calls (e.g.intestimateInjectedTokens(ChatRequest request) Estimate: the catalog when no skill is active, otherwise the skill content this turn will inject, measured from the history as it stands before trimming.intpriority()Execution priority.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.ai.chat.ChatPlugin
decorateToolExecutor, decorateWriter, onComplete, onError, onMessage, onRequest
-
Method Details
-
priority
public int priority()Description copied from interface:ChatPluginExecution priority. Lower values run first. Default is 100.- Specified by:
priorityin interfaceChatPlugin
-
estimateInjectedTokens
Estimate: the catalog when no skill is active, otherwise the skill content this turn will inject, measured from the history as it stands before trimming.Measured rather than assumed: a skill plus a few references runs to several thousand tokens, and a flat guess under-reserves the budget, which makes
ContextWindowPlugintrim too little and push the request over the model's window.- Specified by:
estimateInjectedTokensin interfaceChatPlugin
-
decorateProvider
Description copied from interface:ChatPluginWraps the provider to intercept or enrich LLM calls (e.g. RAG, system prompt injection).- Specified by:
decorateProviderin interfaceChatPlugin
-