Skip to content

Create, Evaluate, and Connect AI Skills

update SKILLNET_MODEL

Jiang Chen789d2db5e690
diff --git a/README.md b/README.md
index 1dc75d0..44f0a2e 100644
--- a/README.md
+++ b/README.md
@@ -314,6 +314,7 @@ skillnet analyze ./my_agent_skills --model gpt-4o
| `API_KEY` | `create` · `evaluate` · `analyze` | — |
| `BASE_URL` | Custom LLM endpoint | `https://api.openai.com/v1` |
| `GITHUB_TOKEN` | Private repos / higher rate limits | — |
+| `SKILLNET_MODEL` | Default LLM model for all commands | `gpt-4o` |
| `GITHUB_MIRROR` | Faster downloads in restricted networks | — |
> `search` and `download` (public repos) work without any credentials.
diff --git a/skillnet-ai/README.md b/skillnet-ai/README.md
index a481e82..1d20016 100644
--- a/skillnet-ai/README.md
+++ b/skillnet-ai/README.md
@@ -236,6 +236,7 @@ skillnet analyze ./my_skills --model gpt-4o
| `API_KEY` | `create` · `evaluate` · `analyze` | — |
| `BASE_URL` | Custom LLM endpoint | `https://api.openai.com/v1` |
| `GITHUB_TOKEN` | Private repos / higher rate limits | — |
+| `SKILLNET_MODEL` | Default LLM model for all commands | `gpt-4o` |
| `GITHUB_MIRROR` | Faster downloads in restricted networks | — |
> `search` and `download` (public repos) require **no credentials at all**.
diff --git a/skillnet-ai/src/skillnet_ai/cli.py b/skillnet-ai/src/skillnet_ai/cli.py
index c3e4c05..d50608d 100644
--- a/skillnet-ai/src/skillnet_ai/cli.py
+++ b/skillnet-ai/src/skillnet_ai/cli.py
@@ -16,6 +16,7 @@ console = Console()
API_KEY = os.getenv("API_KEY")
BASE_URL = os.getenv("BASE_URL") or "https://api.openai.com/v1"
+DEFAULT_MODEL = os.getenv("SKILLNET_MODEL", "gpt-4o")
@app.command()
def search(
@@ -180,7 +181,7 @@ def create(
# Output options
output_dir: Path = typer.Option(Path("./generated_skills"), "--output-dir", "-d", help="Directory to save generated skills."),
# Model options
- model: str = typer.Option("gpt-4o", "--model", "-m", help="LLM model to use (e.g., gpt-4o, gpt-3.5-turbo)."),
+ model: str = typer.Option(DEFAULT_MODEL, "--model", "-m", help="LLM model to use (e.g., gpt-4o, gpt-3.5-turbo)."),
max_files: int = typer.Option(50, "--max-files", help="Max code files to analyze (--github only)."),
):
"""
@@ -421,7 +422,7 @@ def evaluate(
description: str = typer.Option(None, help="Short description of what the skill does."),
# Config options
- model: str = typer.Option("gpt-4o", "--model", "-m", help="LLM model to use."),
+ model: str = typer.Option(DEFAULT_MODEL, "--model", "-m", help="LLM model to use."),
max_workers: int = typer.Option(5, help="Concurrency for batch operations (not used for single eval)."),
):
"""
@@ -515,7 +516,7 @@ def _display_evaluation_report(target_name: str, data: dict):
def analyze(
skills_dir: Path = typer.Argument(..., exists=True, file_okay=False, help="Directory containing multiple skill folders to analyze."),
save: bool = typer.Option(True, "--save/--no-save", help="Save the result to relationships.json in the directory."),
- model: str = typer.Option("gpt-4o", "--model", "-m", help="LLM model to use."),
+ model: str = typer.Option(DEFAULT_MODEL, "--model", "-m", help="LLM model to use."),
):
"""
Analyze and map relationships (similar_to, belong_to, compose_with, depend_on) between local skills.