Skip to content

Conversation

hardikjshah
Copy link
Contributor

What does this PR do?

Added ToolCall.arguments_json to allow for json strings to be passed to client

Test Plan

pytest -s -v --stack-config=fireworks tests/integration/inference/test_text_inference.py --text-model meta-llama/Llama-3.1-8B-Instruct

hardikjshah added a commit to llamastack/llama-stack that referenced this pull request Mar 19, 2025
… be decoded on client side (#1685)

### What does this PR do?

Currently, `ToolCall.arguments` is a `Dict[str, RecursiveType]`.
However, on the client SDK side -- the `RecursiveType` gets deserialized
into a number ( both int and float get collapsed ) and hence when params
are `int` they get converted to float which might break client side
tools that might be doing type checking.

Closes: https://github.com/meta-llama/llama-stack/issues/1683

### Test Plan
Stainless changes --
llamastack/llama-stack-client-python#204
```
pytest -s -v --stack-config=fireworks tests/integration/agents/test_agents.py  --text-model meta-llama/Llama-3.1-8B-Instruct
```
@hardikjshah hardikjshah force-pushed the llama-stack-client-python branch from 52be85d to 1ca6508 Compare March 19, 2025 17:42
@hardikjshah hardikjshah merged commit 3d4f677 into main Mar 19, 2025
2 checks passed
@hardikjshah hardikjshah deleted the llama-stack-client-python branch March 19, 2025 17:44
franciscojavierarceo pushed a commit to franciscojavierarceo/llama-stack that referenced this pull request Mar 22, 2025
… be decoded on client side (llamastack#1685)

### What does this PR do?

Currently, `ToolCall.arguments` is a `Dict[str, RecursiveType]`.
However, on the client SDK side -- the `RecursiveType` gets deserialized
into a number ( both int and float get collapsed ) and hence when params
are `int` they get converted to float which might break client side
tools that might be doing type checking.

Closes: https://github.com/meta-llama/llama-stack/issues/1683

### Test Plan
Stainless changes --
llamastack/llama-stack-client-python#204
```
pytest -s -v --stack-config=fireworks tests/integration/agents/test_agents.py  --text-model meta-llama/Llama-3.1-8B-Instruct
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants