-
Notifications
You must be signed in to change notification settings - Fork 363
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
[backend] adding tools for agents, filter tools by agent_id #204
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scott-cohere
had a problem deploying
to
development
June 12, 2024 18:46
— with
GitHub Actions
Failure
scott-cohere
had a problem deploying
to
development
June 12, 2024 18:49
— with
GitHub Actions
Failure
scott-cohere
requested review from
EugeneLightsOn,
malexw,
scottmx81,
tianjing-li and
a team
as code owners
June 12, 2024 18:55
scott-cohere
had a problem deploying
to
development
June 12, 2024 19:47
— with
GitHub Actions
Failure
scott-cohere
had a problem deploying
to
development
June 12, 2024 19:49
— with
GitHub Actions
Failure
scott-cohere
changed the title
[backend] adding tools for agents
[backend] adding tools for agents, filter tools by agent_id
Jun 12, 2024
scott-cohere
had a problem deploying
to
development
June 12, 2024 20:57
— with
GitHub Actions
Failure
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
=======================================
Coverage ? 88.22%
=======================================
Files ? 137
Lines ? 4551
Branches ? 0
=======================================
Hits ? 4015
Misses ? 536
Partials ? 0 ☔ View full report in Codecov by Sentry. |
lusmoura
approved these changes
Jun 13, 2024
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.
LGTM!
ClaytonSmith
pushed a commit
to MiniMap-ai/cohere-toolkit
that referenced
this pull request
Jun 13, 2024
…i#204) * changes * lint * filter tools by agent * lint * update tests * lint and squash migrations * fix alembic migration err * lint
ClaytonSmith
added a commit
to MiniMap-ai/cohere-toolkit
that referenced
this pull request
Jun 17, 2024
* [coral-web] rename schema fields and update openapi client (cohere-ai#189) * update * update client * Add use agents view env variable. (cohere-ai#192) * Change * Format * [backend] api_key not set for class methods (cohere-ai#191) * fix * easier fix * perf: downgrade rehype-highlight and generate once blob url (cohere-ai#193) * perf: downgrade rehype-highlight and generate once blob url * fix: replace code blocks to iframe in conversation history * refactor: run format * refactor: pr feedback * Add OIDC auth strategy, add Blacklist scaffolding (model/schema/crud) (cohere-ai#190) * add oidc, blacklist logic * Add auth * Add logic for GET /auth * Mods * fix: html preview with citations (cohere-ai#200) * [backend] adding tools for agents, filter tools by agent_id (cohere-ai#204) * changes * lint * filter tools by agent * lint * update tests * lint and squash migrations * fix alembic migration err * lint * merge (#3) * [backend] make deployment field optional in API and DB (cohere-ai#213) --------- Co-authored-by: Tianjing Li <[email protected]> Co-authored-by: Tomeu <[email protected]> Co-authored-by: Scott <[email protected]> Co-authored-by: Beatrix De Wilde <[email protected]> * pulling from main * cleaned backend docker image push * syncing with main (conflicts) --------- Co-authored-by: Scott <[email protected]> Co-authored-by: Beatrix De Wilde <[email protected]> Co-authored-by: Tomeu <[email protected]> Co-authored-by: Tianjing Li <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Eventually we would want to map tools to a DB table. However, for v1 we can just store tools as a list of tool names as users cannot actually delete,add,update tools in the application itself (must be done in the code). For v1 we also do not have the notion of different organizations yet.
Also adding query param on
GET /v1/tools
->GET /v1/tools?agent_id=...
to filter tool by agent idmake lint
andmake run-tests
AI Description
This PR introduces a new
tools
field to theAgent
model, allowing for a list of associated tools. This change is reflected in the database schema, test suites, and API endpoints.Agent
model in src/backend/database_models/agent.py now includes atools
field, which is a list ofToolName
enums.tools
column from theagents
table, respectively.create_agent
function in theagent_crud
module.agent_id
parameter. It now returns a list of tools associated with the specified agent, if provided.ToolName
.tools
field in the agent creation and update requests.ToolName
enums.tools
field in the agent creation request.