mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +00:00
raise when client initialize fails
This commit is contained in:
parent
62e5461da7
commit
c335ed8765
1 changed files with 12 additions and 12 deletions
|
@ -17,17 +17,6 @@ from typing import Any, get_args, get_origin, Optional, TypeVar
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
import yaml
|
import yaml
|
||||||
from llama_stack_client import (
|
|
||||||
APIResponse,
|
|
||||||
AsyncAPIResponse,
|
|
||||||
AsyncLlamaStackClient,
|
|
||||||
AsyncStream,
|
|
||||||
LlamaStackClient,
|
|
||||||
NOT_GIVEN,
|
|
||||||
)
|
|
||||||
from pydantic import BaseModel, TypeAdapter
|
|
||||||
from rich.console import Console
|
|
||||||
from termcolor import cprint
|
|
||||||
|
|
||||||
from llama_stack.distribution.build import print_pip_install_help
|
from llama_stack.distribution.build import print_pip_install_help
|
||||||
from llama_stack.distribution.configure import parse_and_maybe_upgrade_config
|
from llama_stack.distribution.configure import parse_and_maybe_upgrade_config
|
||||||
|
@ -46,6 +35,17 @@ from llama_stack.providers.utils.telemetry.tracing import (
|
||||||
setup_logger,
|
setup_logger,
|
||||||
start_trace,
|
start_trace,
|
||||||
)
|
)
|
||||||
|
from llama_stack_client import (
|
||||||
|
APIResponse,
|
||||||
|
AsyncAPIResponse,
|
||||||
|
AsyncLlamaStackClient,
|
||||||
|
AsyncStream,
|
||||||
|
LlamaStackClient,
|
||||||
|
NOT_GIVEN,
|
||||||
|
)
|
||||||
|
from pydantic import BaseModel, TypeAdapter
|
||||||
|
from rich.console import Console
|
||||||
|
from termcolor import cprint
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient):
|
||||||
f"Please run:\n\n{prefix}llama stack build --template {self.config_path_or_template_name} --image-type venv\n\n",
|
f"Please run:\n\n{prefix}llama stack build --template {self.config_path_or_template_name} --image-type venv\n\n",
|
||||||
"yellow",
|
"yellow",
|
||||||
)
|
)
|
||||||
return False
|
raise _e
|
||||||
|
|
||||||
if Api.telemetry in self.impls:
|
if Api.telemetry in self.impls:
|
||||||
setup_logger(self.impls[Api.telemetry])
|
setup_logger(self.impls[Api.telemetry])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue