-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Rewrite AutoGen Studio Database Layer to Use SQLModel ORM #2425
Conversation
async def create_skill(skill: Skill): | ||
"""Create a new skill""" | ||
filters = {"user_id": skill.user_id} | ||
return create_entity(skill, Skill, filters=filters) |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
@api.post("/models") | ||
async def create_model(model: Model): | ||
"""Create a new model""" | ||
return create_entity(model, Model) |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
@api.post("/workflows") | ||
async def create_workflow(workflow: Workflow): | ||
"""Create a new workflow""" | ||
return create_entity(workflow, Workflow) |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
@api.post("/sessions") | ||
async def create_session(session: Session): | ||
"""Create a new session""" | ||
return create_entity(session, Session) |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
Wow, this is fantastic! Happy to see support for more DBs! |
@ma-armenta I have invited you to join as a collaborator to review this issue. |
When I start AutoGen studio built from this branch, it shows multiple "Connection error 404 Not Found" in a banner error message. |
@victordibia The field "admin_name" is declared twice with the exact same specifications and default value from AgentConfig under datamodel.py. version: autogenstudio 0.0.56rc1 |
Thanks. Fixed. |
@victordibia Unable to delete sessions, got |
FYI: It violates foreign key constraint "message_session_id_fkey" on table "message" |
@victordibia I am building from source to test things out. Using postgresql and got |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
10404662 | Triggered | Generic CLI Secret | 2448baa | .github/workflows/dotnet-release.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
…2425) * update orm branch + accesibility tweaks * general file location refactor * add support for LocalCommandLineCodeExecutor and DockerCommandLineCodeExecutor * update code execution config laoding * version update * bump version rc1 * add model type selection (openai , gemini, azure) * add ability to test workflow * psycopg3 support * add close logic to build tab pop ups, enable testing of workflows in build view * updates to dbmanager, version bump * add max_tokens default value * ensure sessions are used correctly in dbmanager * initial support for migrations * update sessions/workflow api routing for clarity. * general refactor, + add support for initial sample workflows * orm branch updates * Removed incorrect Git LFS files * update git lfs tracking --------- Co-authored-by: Audel Rouhi <[email protected]>
Why are these changes needed?
This PR rewrites the database module for autogenstudio using use SQLModel (Pydantic + SQLAlchemy). This provides
--database-uri
argument when running the application. For example,autogenstudio ui --database-uri sqlite:///database.sqlite
for SQLite andautogenstudio ui --database-uri postgresql://user:password@localhost/dbname
for PostgreSQL.LocalCommandLineCodeExecutor
andDockerCommandLineCodeExecutor
introduced by @jackgerrits and @ekzhuTesting
Install autogenstudio from
autogenstudio-orm
branch. Runautogenstudio ui
Related issue number
#1694 #2128
Checks