-
Notifications
You must be signed in to change notification settings - Fork 381
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
[DO NOT MERGE ] Decouple frontend tool config #836
Closed
Closed
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
tianjing-li
requested review from
tomtobac,
abimacarmes,
knajjars,
BeatrixCohere,
EugeneLightsOn,
malexw,
scottmx81 and
a team
as code owners
November 8, 2024 22:09
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #836 +/- ##
==========================================
- Coverage 79.22% 79.22% -0.01%
==========================================
Files 250 250
Lines 10587 10589 +2
==========================================
+ Hits 8388 8389 +1
- Misses 2199 2200 +1 ☔ View full report in Codecov by Sentry. |
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.
Thank you for contributing to the Cohere Toolkit!
PR title: "area: description"
PR message: Delete this entire checklist and replace with
Add tests and docs: Please include testing and documentation for your changes
Lint and test: Run
make lint
andmake run-tests
AI Description
This PR introduces several changes to the codebase, primarily focused on enabling HTTPS for local development and updating the Slack tool configuration.
Enabling HTTPS for Local Development
The PR adds a new section titled "Setup HTTPS for Local Development" in the documentation. It provides instructions for generating a self-signed certificate and key using a specific command in the project root directory. This setup is essential for enabling HTTPS in the local development environment.
Slack Tool Configuration
The PR modifies the
src/interfaces/assistants_web/src/constants/tools.ts
file to enable the Slack tool in the frontend. It adds theTOOL_SLACK_ID
to theAGENT_SETTINGS_TOOLS
list and removes it from theBASE_AGENT_EXCLUDED_TOOLS
list. This change ensures that the Slack tool is available for use in the frontend.Tool Visibility and Availability
The PR introduces a new property,
is_enabled
, in theToolDefinition
class. This property replaces theis_visible
property in various files, includingsrc/backend/schemas/tool.py
,src/backend/tools/brave_search/tool.py
,src/backend/tools/calculator.py
, and more. Theis_enabled
property is used to determine whether a tool is enabled and accessible.Default Tool Configuration
The PR adds a new property,
is_default_tool
, to theToolDefinition
class. This property is used to identify default tools. The PR also introduces a new function,getDefaultAgent
, in theCohereClient
class, which filters and returns default tools based on their names andis_default_tool
property.Other Changes
DiscoverAgentCard
component to use thecheckIsDefaultAgent
function instead ofcheckIsBaseAgent
.BASE_AGENT_TOOLS
constant and replaces it with a filter based on theis_default_tool
property.FieldValues
, to define the structure of agent settings fields.CreateAgent
component to use theuseListDefaultTool
hook and set default tool IDs.BASE_AGENT
constant and replaces it withcohereServerClient.getDefaultAgent()
.Summary
In summary, the PR focuses on enabling HTTPS for local development, updating Slack tool configuration, and introducing new properties for tool visibility, availability, and default tool configuration. These changes enhance the codebase's functionality and improve the overall user experience.