You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AI Intent plugin may need to complete intent recognition tasks under different requirement scenarios, such as:
Identifying the complexity of the current request and the domain of the question, which is used for routing to different models (for example, coding-related questions to Claude);
Identifying whether the current request has time sensitivity or characteristics that prevent returning cached content, which is used to control whether to enable AI caching capabilities;
Identifying the purpose of the current request, which is recorded in logs for data organization and analysis.
But the current AI Intent plugin can only recognize one intent.
Implementation suggestions
Modify the implementation of the AI Intent plugin to support the following configuration:
prompt: | You are an intelligent category recognition assistant, responsible for determining which preset category a question belongs to based on the user's query and predefined categories, and providing the corresponding category. The user's question is: '${question}' The preset categories are: ${categories} Please respond directly with the category in the following manner: - {"useFor": "scene1", "result": "result1"} - {"useFor": "scene2", result: "result2"} Ensure that different `useFor` are on different lines, and that `useFor` and `result` appear on the same line.categories:
- useFor: intent-routeoptions:
- Finance
- E-commerce
- Law
- Others
- useFor: disable-cacheoptions:
- Time-sensitive
- An innovative response is needed
- Othersllm:
serviceName: "qwen.dns"servicePort: "443"url: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"model: "qwen-long"apiKey: "xxxxx"timeoutSeconds: "10"
Here, I have made some optimizations to the plugin configuration to make it easier for users to set up. I suggest that implementers refer to these changes and modify the original plugin configuration parsing logic.
example:
For the configuration example above, the category of intent-route is set in the property this way.
Why do you need it?
The AI Intent plugin may need to complete intent recognition tasks under different requirement scenarios, such as:
But the current AI Intent plugin can only recognize one intent.
Implementation suggestions
Modify the implementation of the AI Intent plugin to support the following configuration:
example:
For the configuration example above, the category of intent-route is set in the property this way.
The text was updated successfully, but these errors were encountered: