Classify a user conversation to determine which tools to activate.
The conversation should contain the last user message plus a compaction of the previous chat history (each 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
Classify a user conversation to determine which tools to activate.
The
conversationshould contain the last user message plus a compaction of the previous chat history (each truncated to save tokens).