Skip to content

Commit

Permalink
Merge branch 'main' into agentchat-tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhu authored Nov 10, 2024
2 parents 86e80eb + 0e985d4 commit 160f335
Show file tree
Hide file tree
Showing 117 changed files with 20,720 additions and 13,584 deletions.
4 changes: 4 additions & 0 deletions python/packages/autogen-studio/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ database.sqlite
.cache/*
autogenstudio/web/files/user/*
autogenstudio/test
autogenstudio/database/alembic.ini
autogenstudio/database/alembic/*
autogenstudio/web/files/ui/*
OAI_CONFIG_LIST
scratch/
Expand All @@ -10,8 +12,10 @@ autogenstudio/web/ui/*
autogenstudio/web/skills/user/*
.release.sh
.nightly.sh
notebooks/test

notebooks/work_dir/*
notebooks/test.db

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
3 changes: 1 addition & 2 deletions python/packages/autogen-studio/autogenstudio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .chatmanager import *
from .datamodel import *
from .version import __version__
from .workflowmanager import *
from .teammanager import *
179 changes: 0 additions & 179 deletions python/packages/autogen-studio/autogenstudio/chatmanager.py

This file was deleted.

12 changes: 10 additions & 2 deletions python/packages/autogen-studio/autogenstudio/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ def ui(
host: str = "127.0.0.1",
port: int = 8081,
workers: int = 1,
reload: Annotated[bool, typer.Option("--reload")] = False,
reload: Annotated[bool, typer.Option("--reload")] = True,
docs: bool = True,
appdir: str = None,
database_uri: Optional[str] = None,
upgrade_database: bool = False,
):
"""
Run the AutoGen Studio UI.
Expand All @@ -30,21 +31,28 @@ def ui(
reload (bool, optional): Whether to reload the UI on code changes. Defaults to False.
docs (bool, optional): Whether to generate API docs. Defaults to False.
appdir (str, optional): Path to the AutoGen Studio app directory. Defaults to None.
database-uri (str, optional): Database URI to connect to. Defaults to None. Examples include sqlite:///autogenstudio.db, postgresql://user:password@localhost/autogenstudio.
database-uri (str, optional): Database URI to connect to. Defaults to None.
"""

os.environ["AUTOGENSTUDIO_API_DOCS"] = str(docs)
if appdir:
os.environ["AUTOGENSTUDIO_APPDIR"] = appdir
if database_uri:
os.environ["AUTOGENSTUDIO_DATABASE_URI"] = database_uri
if upgrade_database:
os.environ["AUTOGENSTUDIO_UPGRADE_DATABASE"] = "1"

uvicorn.run(
"autogenstudio.web.app:app",
host=host,
port=port,
workers=workers,
reload=reload,
reload_excludes=[
"**/alembic/*",
"**/alembic.ini",
"**/versions/*"
] if reload else None
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# from .dbmanager import *
from .dbmanager import *
from .utils import *
from .db_manager import DatabaseManager
from .component_factory import ComponentFactory
from .config_manager import ConfigurationManager
116 changes: 0 additions & 116 deletions python/packages/autogen-studio/autogenstudio/database/alembic.ini

This file was deleted.

Loading

0 comments on commit 160f335

Please sign in to comment.