llama-stack/llama_stack
ehhuang ee5e9b935a
feat: better using get_default_tool_prompt_format (#1360)
Summary:
https://github.com/meta-llama/llama-stack/pull/1214 introduced
`get_default_tool_prompt_format` but tried to use it on the raw
identifier.

Here we move calling this func later in the stack and rely on the
inference provider to resolve the raw identifier into llama model, then
call get_default_tool_prompt_format.

Test Plan:
```
LLAMA_STACK_CONFIG=ollama pytest -s -v tests/client-sdk/inference/test_text_inference.py::test_text_chat_completion_with_tool_calling_and_non_streaming --inference-model=llama3.2:3b-instruct-fp16 --vision-inference-model=""
```

Before:

<img width="1288" alt="image"
src="https://github.com/user-attachments/assets/918c7839-1f45-4540-864e-4b842cc367df"
/>

After:
<img width="1522" alt="image"
src="https://github.com/user-attachments/assets/447d78af-b3b9-4837-8cb7-6ac549005efe"
/>
2025-03-03 14:50:06 -08:00
..
apis feat: enhance OpenAPI spec to include Error types (#1320) 2025-02-28 11:16:12 -08:00
cli chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
distribution feat: better using get_default_tool_prompt_format (#1360) 2025-03-03 14:50:06 -08:00
models/llama refactor: move llama3 impl to meta_reference provider (#1364) 2025-03-03 13:22:57 -08:00
providers feat: better using get_default_tool_prompt_format (#1360) 2025-03-03 14:50:06 -08:00
scripts chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
strong_typing Ensure that deprecations for fields follow through to OpenAPI 2025-02-19 13:54:04 -08:00
templates chore: remove straggler references to llama-models (#1345) 2025-03-01 14:26:03 -08:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
logcat.py feat: add a configurable category-based logger (#1352) 2025-03-02 18:51:14 -08:00
schema_utils.py ci: add mypy for static type checking (#1101) 2025-02-21 13:15:40 -08:00