Skip to content

Commit 250676f

Browse files
committed
Sync updates from stainless branch: yanxi0830/dev
1 parent c645726 commit 250676f

File tree

10 files changed

+803
-11
lines changed

10 files changed

+803
-11
lines changed

src/llama_stack_client/_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def _build_request(
518518
# so that passing a `TypedDict` doesn't cause an error.
519519
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
520520
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
521-
json=json_data,
521+
json=json_data if is_given(json_data) else None,
522522
files=files,
523523
**kwargs,
524524
)

src/llama_stack_client/_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ def __init__(
126126
) -> None:
127127
"""Construct a new synchronous llama-stack-client client instance.
128128
129-
This automatically infers the `api_key` argument from the `LLAMA_STACK_CLIENT_API_KEY` environment variable if it is not provided.
129+
This automatically infers the `api_key` argument from the `LLAMA_STACK_API_KEY` environment variable if it is not provided.
130130
"""
131131
if api_key is None:
132-
api_key = os.environ.get("LLAMA_STACK_CLIENT_API_KEY")
132+
api_key = os.environ.get("LLAMA_STACK_API_KEY")
133133
self.api_key = api_key
134134

135135
if base_url is None:
136-
base_url = os.environ.get("LLAMA_STACK_CLIENT_BASE_URL")
136+
base_url = os.environ.get("LLAMA_STACK_BASE_URL")
137137
if base_url is None:
138138
base_url = f"http://any-hosted-llama-stack.com"
139139

@@ -342,14 +342,14 @@ def __init__(
342342
) -> None:
343343
"""Construct a new async llama-stack-client client instance.
344344
345-
This automatically infers the `api_key` argument from the `LLAMA_STACK_CLIENT_API_KEY` environment variable if it is not provided.
345+
This automatically infers the `api_key` argument from the `LLAMA_STACK_API_KEY` environment variable if it is not provided.
346346
"""
347347
if api_key is None:
348-
api_key = os.environ.get("LLAMA_STACK_CLIENT_API_KEY")
348+
api_key = os.environ.get("LLAMA_STACK_API_KEY")
349349
self.api_key = api_key
350350

351351
if base_url is None:
352-
base_url = os.environ.get("LLAMA_STACK_CLIENT_BASE_URL")
352+
base_url = os.environ.get("LLAMA_STACK_BASE_URL")
353353
if base_url is None:
354354
base_url = f"http://any-hosted-llama-stack.com"
355355

src/llama_stack_client/_utils/_logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def _basic_config() -> None:
1414

1515

1616
def setup_logging() -> None:
17-
env = os.environ.get("LLAMA_STACK_CLIENT_LOG")
17+
env = os.environ.get("LLAMA_STACK_LOG")
1818
if env == "debug":
1919
_basic_config()
2020
logger.setLevel(logging.DEBUG)

0 commit comments

Comments
 (0)