Const
Classifies a user conversation to pick the tools to activate.
The conversation should contain the last user message plus a compaction of the earlier chat history, each message truncated to save tokens.
conversation
const result = await classifyUserIntent(conversation, { chatModel: openai('gpt-4o-mini'), toolsMetadata,});// result.activeToolNames contains the selected tools Copy
const result = await classifyUserIntent(conversation, { chatModel: openai('gpt-4o-mini'), toolsMetadata,});// result.activeToolNames contains the selected tools
Classifies a user conversation to pick the tools to activate.
The
conversationshould contain the last user message plus a compaction of the earlier chat history, each message truncated to save tokens.