-
Notifications
You must be signed in to change notification settings - Fork 24
add cli argument for model config #232
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -451,6 +451,7 @@ async def run_main( | |
| taskflow_path: str | None, | ||
| cli_globals: dict[str, str], | ||
| prompt: str | None, | ||
| cli_model_config: str | None, | ||
| resume_session_id: str | None = None, | ||
| ) -> None: | ||
| """Main entry point for taskflow/personality execution. | ||
|
|
@@ -461,6 +462,7 @@ async def run_main( | |
| taskflow_path: Taskflow module path, or None. | ||
| cli_globals: Global variables from CLI. | ||
| prompt: User prompt text. | ||
| cli_model_config: Model configuration module path, or None. | ||
| resume_session_id: Session ID to resume from a checkpoint. | ||
| """ | ||
| from .session import TaskflowSession | ||
|
|
@@ -511,6 +513,8 @@ async def on_handoff_hook(context: RunContextWrapper[TContext], agent: Agent[TCo | |
|
|
||
| # Resolve model config | ||
| model_config_ref = taskflow_doc.model_config_ref | ||
| if cli_model_config: | ||
| model_config_ref = cli_model_config | ||
|
Comment on lines
514
to
+517
|
||
| model_keys: list[str] = [] | ||
| model_dict: dict[str, str] = {} | ||
| models_params: dict[str, dict[str, Any]] = {} | ||
|
|
||
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.
The keyword argument is written with spaces around the '=' ("cli_model_config = model_config"), which violates Ruff/pycodestyle E251 and will fail linting. Remove the spaces (use "cli_model_config=model_config").