-
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
TLK-1864 agents deployments models refactoring #824
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #824 +/- ##
==========================================
- Coverage 79.73% 79.69% -0.05%
==========================================
Files 244 244
Lines 10486 10342 -144
==========================================
- Hits 8361 8242 -119
+ Misses 2125 2100 -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.
Very minor change, then good to go
else None | ||
) | ||
def model(self) -> Optional[str]: | ||
return self.assigned_model.name if self.assigned_model else None |
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.
Nice! A lot cleaner
organization_id=agent.organization_id, | ||
tools=agent.tools, | ||
is_private=agent.is_private, | ||
deployment_id=deployment_db.id if deployment_db else None, |
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.
Instead of defaulting to None, can we fallback to Cohere Platform + command-r-plus as defaults?
Models refactoring for agents, deployments and models
AI Description
This PR introduces a new
UpdateAgentDB
class and modifies theAgent
class to includedeployment_id
andmodel_id
fields. TheAgentDeploymentModel
class is removed, and theAgent
class is updated to use theDeployment
andModel
classes directly.The following changes are made:
AgentDeploymentModel
class is removed from thebackend/database_models/agent.py
file.Agent
class is modified to includedeployment_id
andmodel_id
fields, which are used to establish relationships with theDeployment
andModel
classes, respectively.Agent
class'sdeployment
andmodel
properties are updated to return the names of the associatedDeployment
andModel
instances, respectively.Agent
class'sset_default_agent_deployment_model
method is removed, as it is no longer needed.Agent
class'sdefault_model_association
anddeployment
properties are removed, as they are no longer needed.Agent
class'sdeployments
relationship is removed, as it is no longer needed.Agent
class'sagent_deployment_associations
relationship is removed, as it is no longer needed.Deployment
class'sagents
relationship is removed, as it is no longer needed.Deployment
class'sagent_deployment_associations
relationship is removed, as it is no longer needed.Model
class'sagent_deployment_associations
relationship is removed, as it is no longer needed.Model
class'sagents
relationship is removed, as it is no longer needed.AgentDeploymentModel
class is removed from thebackend/database_models/deployment.py
file.AgentDeploymentModel
class is removed from thebackend/database_models/model.py
file.AgentDeploymentModel
class is removed from thebackend/schemas/agent.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/factories/__init__.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/factories/agent_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_chat.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from thebackend/tests/unit/routers/test_agent_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment.py
file.AgentDeploymentModel
class is removed from the `backend/tests/unit/routers/test_agent_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_deployment_model_