mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 01:48:05 +00:00
update fixture
This commit is contained in:
parent
7bd4c09aef
commit
e6de865bcb
1 changed files with 14 additions and 3 deletions
|
|
@ -233,10 +233,21 @@ def instantiate_llama_stack_client(session):
|
|||
raise ValueError("You must specify either --stack-config or LLAMA_STACK_CONFIG")
|
||||
|
||||
# Handle server:<config_name> format or server:<config_name>:<port>
|
||||
# Also handles server:<distro>::<run_file.yaml> format
|
||||
if config.startswith("server:"):
|
||||
parts = config.split(":")
|
||||
config_name = parts[1]
|
||||
port = int(parts[2]) if len(parts) > 2 else int(os.environ.get("LLAMA_STACK_PORT", DEFAULT_PORT))
|
||||
# Strip the "server:" prefix first
|
||||
config_part = config[7:] # len("server:") == 7
|
||||
|
||||
# Check for :: (distro::runfile format)
|
||||
if "::" in config_part:
|
||||
config_name = config_part
|
||||
port = int(os.environ.get("LLAMA_STACK_PORT", DEFAULT_PORT))
|
||||
else:
|
||||
# Single colon format: either <name> or <name>:<port>
|
||||
parts = config_part.split(":")
|
||||
config_name = parts[0]
|
||||
port = int(parts[1]) if len(parts) > 1 else int(os.environ.get("LLAMA_STACK_PORT", DEFAULT_PORT))
|
||||
|
||||
base_url = f"http://localhost:{port}"
|
||||
|
||||
force_restart = os.environ.get("LLAMA_STACK_TEST_FORCE_SERVER_RESTART") == "1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue