diff --git a/openllm_next/local.py b/openllm_next/local.py index c0dd0f5a..947192fb 100644 --- a/openllm_next/local.py +++ b/openllm_next/local.py @@ -85,7 +85,7 @@ async def _run_model( from openai import AsyncOpenAI - client = AsyncOpenAI(base_url=f"http://localhost:{port}/v1") + client = AsyncOpenAI(base_url=f"http://localhost:{port}/v1", api_key="local") model_id = (await client.models.list()).data[0].id while True: try: diff --git a/openllm_next/repo.py b/openllm_next/repo.py index 704f09eb..7d335c50 100644 --- a/openllm_next/repo.py +++ b/openllm_next/repo.py @@ -50,7 +50,6 @@ def _complete_alias(repo_name: str): from openllm_next.model import list_bento for bento in list_bento(repo_name=repo_name): - path = bento.path alias = bento.labels.get("openllm_alias", "").strip() if alias: for a in alias.split(","): @@ -81,7 +80,6 @@ def update(): depth=1, branch=repo.branch, ) - _complete_alias(repo_name) output("") output(f"Repo `{repo.name}` updated", style="green") except: @@ -110,6 +108,8 @@ def update(): output(f"Removed unused repo cache {c}") with open(REPO_DIR / "last_update", "w") as f: f.write(datetime.datetime.now().isoformat()) + for repo_name in config.repos: + _complete_alias(repo_name) def ensure_repo_updated():