llama-stack-mirror/llama_stack
Xi Yan 15f69e75ff
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:25:23 -08:00
..
apis feat: enhance OpenAPI spec to include Error types (#1320) 2025-02-28 11:16:12 -08:00
cli chore(lint): update Ruff ignores for project conventions and maintainability (#1184) 2025-02-28 09:36:49 -08:00
distribution chore: update cmd check (#1293) 2025-02-28 10:08:05 -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:25:23 -08:00
scripts chore(lint): update Ruff ignores for project conventions and maintainability (#1184) 2025-02-28 09:36:49 -08:00
strong_typing Ensure that deprecations for fields follow through to OpenAPI 2025-02-19 13:54:04 -08:00
templates docs: update the downloaded list doc (#1266) 2025-02-28 10:10:12 -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