-
Notifications
You must be signed in to change notification settings - Fork 45.1k
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
feat(backend): Migrate old models in existing agents #9452
base: dev
Are you sure you want to change the base?
feat(backend): Migrate old models in existing agents #9452
Conversation
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
Here's the code health analysis summary for commits Analysis Summary
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
@@ -71,6 +72,9 @@ class NodeModel(Node): | |||
def from_db(node: AgentNode): | |||
if not node.AgentBlock: | |||
raise ValueError(f"Invalid node {node.id}, invalid AgentBlock.") | |||
|
|||
NodeModel.migrate_llm_models(node) |
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.
What if we do that here autogpt_platform/backend/backend/server/rest_api.py
@contextlib.asynccontextmanager
async def lifespan_context(app: fastapi.FastAPI):
await backend.data.db.connect()
await backend.data.block.initialize_blocks()
await backend.data.user.migrate_and_encrypt_user_integrations()
await backend.data.graph.fix_llm_provider_credentials()
with launch_darkly_context():
yield
await backend.data.db.disconnect()
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.
In general happy with this approach. However, I don't feel we should be migrating ai models with clearly communicating it to the user.
Can we add a ticket to push a notification to the user when a model has to be migrated and we can address this at an appropriate time
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Some existing nodes use models that no longer exist as values on
LlmModel
enum.Changes 🏗️
gpt-4o
when loadingAgentNode
from_db
gpt-4o
Checklist 📋
For code changes: