-
Notifications
You must be signed in to change notification settings - Fork 383
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
Improve agent creation flow #814
Improve agent creation flow #814
Conversation
dbd603c
to
c460dde
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #814 +/- ##
==========================================
- Coverage 79.80% 79.68% -0.12%
==========================================
Files 243 243
Lines 10355 10417 +62
==========================================
+ Hits 8264 8301 +37
- Misses 2091 2116 +25 ☔ View full report in Codecov by Sentry. |
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.
Small change requested
Create deployments and models during the agent creation flow if they are not present in the database but have configurations in the codebase.
AI Description
This PR introduces new functions and updates existing ones to enhance the deployment and model management system.
New Functions:
find_config_by_deployment_id
andfind_config_by_deployment_name
insrc/backend/config/deployments.py
enable configuration retrieval by deployment ID or name.create_deployment_by_config
insrc/backend/crud/deployment.py
facilitates deployment creation from a configuration.get_model_by_name
insrc/backend/crud/model.py
retrieves a model by its name.create_model_by_config
insrc/backend/crud/model.py
creates a new model based on a configuration.Updated Functions:
validate_deployment_model
insrc/backend/services/request_validators.py
now checks deployment config settings and creates deployments and models if they are not found.test_create_agent_deployment_not_in_db
insrc/backend/tests/unit/routers/test_agent.py
tests agent creation with a deployment not in the database.test_streaming_chat_with_tools_not_in_agent_tools
andtest_streaming_chat_with_agent_tools_and_empty_request_tools
insrc/backend/tests/unit/routers/test_chat.py
have been updated to use the "tavily_web_search" tool.