-
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: Tool config improvements #822
Open
tianjing-li
wants to merge
19
commits into
main
Choose a base branch
from
tool-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
October 28, 2024 15:19
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #822 +/- ##
===========================================
- Coverage 79.12% 53.69% -25.43%
===========================================
Files 250 204 -46
Lines 10673 7762 -2911
===========================================
- Hits 8445 4168 -4277
- Misses 2228 3594 +1366 ☔ View full report in Codecov by Sentry. |
tianjing-li
changed the title
backend: Initial tool refactoring - more to come
backend: Tool config improvements - WIP
Oct 30, 2024
tianjing-li
changed the title
backend: Tool config improvements - WIP
backend: Tool config improvements
Nov 1, 2024
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.
Some tool refactoring, renaming of schemas to improve code readability. More to come
AI Description
This PR introduces several changes to the project's codebase, primarily focusing on tool configuration, testing, and documentation.
Tool Configuration
src/backend/config/tools.py
file has been updated to use theTool
enum andToolDefinition
class for tool management.ToolName
enum andManagedTool
class have been removed, and theget_available_tools()
function now returns a dictionary ofToolDefinition
objects.src/backend/schemas/tool.py
file has been modified to introduce theToolCategory
enum andToolDefinition
class, replacing theCategory
enum andManagedTool
class.src/backend/tests/unit/configuration.yaml
file has been updated to remove theenabled_tools
section.src/backend/config/settings.py
file has been modified to remove theenabled_tools
field from theToolSettings
class.src/backend/config/configuration.template.yaml
file has been updated to remove theenabled_tools
section.src/backend/tests/unit/crud/test_agent_tool_metadata.py
,src/backend/tests/unit/crud/test_tool_auth.py
,src/backend/tests/unit/factories/agent.py
,src/backend/tests/unit/factories/agent_tool_metadata.py
, andsrc/backend/tests/unit/factories/tool_auth.py
files have been modified to use theTool
enum for tool references.src/backend/tests/unit/crud/test_agent.py
file has been updated to use theTool
enum for tool references in agent creation and update tests.src/backend/tests/integration/routers/test_agent.py
file has been modified to use theTool
enum for tool references in agent creation tests.src/backend/cli/constants.py
file has been updated to introduce theTool
enum andCOMMUNITY_TOOLS
dictionary for community tool configuration.src/backend/cli/main.py
file has been modified to import theCOMMUNITY_TOOLS
dictionary fromsrc/backend/cli/constants.py
.src/backend/routers/auth.py
,src/backend/routers/tool.py
,src/backend/services/auth/strategies/base.py
,src/backend/services/chat.py
,src/backend/services/file.py
, andsrc/backend/services/request_validators.py
files have been updated to use theget_available_tools()
function for tool retrieval.src/backend/main.py
file has been modified to import thelogging
module and set the log level for thepydantic
logger toERROR
.src/backend/pytest.ini
file has been updated to include afilterwarnings
entry to ignoreUserWarning
messages from thepydantic
module.src/backend/chat/custom/custom.py
,src/backend/chat/custom/tool_calls.py
, andsrc/backend/tests/unit/chat/test_tool_calls.py
files have been modified to use theget_available_tools()
function for tool retrieval.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to include amock_get_available_tools()
fixture for mocking theget_available_tools()
function.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theTool
enum for tool references in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been updated to use theToolDefinition
class for tool definitions in test cases.src/backend/tests/unit/chat/test_tool_calls.py
file has been modified to use theToolDefinition
class for tool definitions in test cases.