Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 'Get List' Functionality for Raven Bot to Fetch Document Lists from Frappe #1084

Merged
merged 6 commits into from
Oct 11, 2024

Conversation

bvisible
Copy link
Contributor

This pull request adds a new get_list function to enable Raven Bot to retrieve lists of documents from Frappe. The implementation includes support for filters, custom fields, and a limit on the number of documents returned. This enhancement significantly improves Raven Bot's ability to query and return data dynamically from Frappe.

Key Changes:

  • Added get_list function in raven/ai/functions.py to fetch documents using frappe.get_list.
  • Updated handle_requires_action in raven/ai/handler.py to process the "Get List" function.
  • Adjusted the AI function parameters in raven_ai_function.py to support filters, fields, and limit inputs.
  • Modified FunctionConstants.ts to re-enable the "Get List" option in the frontend settings.

This new functionality expands Raven Bot’s capacity to fetch relevant document data based on user-specified filters, making the bot more efficient in handling user queries.

"properties": {
"filters": {
"type": "object",
"description": "Filters to apply when retrieving the list",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this need more details like "additional_properties" and the variable names?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are currently working on this and testing different variations. We're exploring how best to handle additional_properties and variable names to ensure flexibility and accuracy. Thank you for the suggestion!

@nikkothari22 nikkothari22 merged commit f041817 into The-Commit-Company:develop Oct 11, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants