-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Create agent: support wildcards in tables / KB names #11067
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
base: main
Are you sure you want to change the base?
Conversation
…tables, ignore_knowledge_bases
Unable to Process PR Review The author of this PR does not exist on Entelligence Dashboard. Please add the user to Entelligence AI here to enable reviews for this user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work
# Conflicts: # mindsdb/interfaces/skills/sql_agent.py
if len(table.parts) == 1: | ||
tbl = table.parts[0] | ||
elif len(table.parts) == 2: | ||
db, tbl = table.parts | ||
db = db.lower() | ||
elif len(table.parts) == 3: | ||
db, schema, tbl = table.parts | ||
schema = schema.lower() | ||
db = db.lower() | ||
else: | ||
raise NotImplementedError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much more readable :p
match [x.lower() for x in parts]:
case [tbl]:
pass
case [db, tb
10000
l]:
pass
case [db, schema, tbl]:
pass
case _:
raise NotImplementedError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
- get all KB to detect what object was requested by agent - depending on it check_knowledge_base_permission or check_table_permission is used
Description
Example:
Fixes https://linear.app/mindsdb/issue/RES-60/add-entire-database-to-agents
Type of change
Verification Process
To ensure the changes are working as expected:
Additional Media:
Checklist: