mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-24 19:00:01 +00:00
fix: stop image_name from being cast to an integer
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
This commit is contained in:
parent
5400a2e2b1
commit
9a5d47e085
4 changed files with 50 additions and 4 deletions
|
|
@ -267,6 +267,13 @@ def _convert_string_to_proper_type(value: str) -> Any:
|
|||
return value
|
||||
|
||||
|
||||
def cast_image_name_to_string(config_dict: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Ensure that any value for a key 'image_name' in a config_dict is a string"""
|
||||
if "image_name" in config_dict and config_dict["image_name"] is not None:
|
||||
config_dict["image_name"] = str(config_dict["image_name"])
|
||||
return config_dict
|
||||
|
||||
|
||||
def validate_env_pair(env_pair: str) -> tuple[str, str]:
|
||||
"""Validate and split an environment variable key-value pair."""
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue