llama-stack/llama_stack
Xi Yan 75cda30df7 fix: replace eval with json decoding for format_adapter (#1328)
# What does this PR do?
- using `eval` is a security risk

[//]: # (If resolving an issue, uncomment and update the line below)
[//]: # (Closes #[issue-number])

## Test Plan

- see https://github.com/meta-llama/llama-stack/pull/1327

cc @SLR722 we will need to update the corresponding dataset via

```python
def update_to_json_str():
        
dataset = datasets.load_dataset(...)
processed_dataset = dataset[split].map(
        lambda x: {
                "column": json.dumps(eval(x["column"]))
       }
)
processed_dataset.push_to_hub(...)
```
[//]: # (## Documentation)
2025-02-28 11:41:37 -08:00
..
apis ci: add mypy for static type checking (#1101) 2025-02-21 13:15:40 -08:00
cli fix: Incorrect import path for print_subcommand_description() (#1315) 2025-02-27 18:50:41 -08:00
distribution fix: check conda env name using basepath in exec.py (#1301) 2025-02-27 23:07:23 -08:00
models/llama feat: update the default system prompt for 3.2/3.3 models (#1310) 2025-02-27 23:05:42 -08:00
providers fix: replace eval with json decoding for format_adapter (#1328) 2025-02-28 11:41:37 -08:00
scripts ci: add mypy for static type checking (#1101) 2025-02-21 13:15:40 -08:00
strong_typing Ensure that deprecations for fields follow through to OpenAPI 2025-02-19 13:54:04 -08:00
templates fix: ensure ollama embedding model is registered properly in the template 2025-02-27 22:49:06 -08:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
schema_utils.py ci: add mypy for static type checking (#1101) 2025-02-21 13:15:40 -08:00