-
Notifications
You must be signed in to change notification settings - Fork 72
Comparing changes
Open a pull request
base repository: meta-llama/llama-stack-client-python
base: v0.1.2
head repository: meta-llama/llama-stack-client-python
compare: v0.1.3
- 10 commits
- 77 files changed
- 7 contributors
Commits on Feb 11, 2025
-
fix: broken .retrieve call using
identifier=
(#135)# What does this PR do? identifier is not a valid argument for `retrieve` but model_id is. ``` ╰─ llama-stack-client models get meta-llama/Llama-3.2-3B-Instruct ╭────────────────────────────────────────────────────────────────────────────────────╮ │ Failed to get model details │ │ │ │ Error Type: TypeError │ │ Details: ModelsResource.retrieve() got an unexpected keyword argument 'identifier' │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ``` [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan the error now is: ``` ╰─ llama-stack-client models get meta-llama/Llama-3.2-3B-Instruct ╭────────────────────────────────────────────────────╮ │ Failed to get model details │ │ │ │ Error Type: NotFoundError │ │ Details: Error code: 404 - {'detail': 'Not Found'} │ ╰────────────────────────────────────────────────────╯ ``` Signed-off-by: Charlie Doern <cdoern@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 626805a - Browse repository at this point
Copy the full SHA 626805aView commit details -
Humanize CLI command group descriptions a bit (#137)
# What does this PR do? Descriptions were repetitive and verbose, some were truncated by click rendering (trailing ... ellipsis). This is an attempt to simplify / shorten / clarify the descriptions. [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan Before: ``` llama-stack-client --help Usage: llama-stack-client [OPTIONS] COMMAND [ARGS]... Welcome to the LlamaStackClient CLI Options: --version Show the version and exit. --endpoint TEXT Llama Stack distribution endpoint --api-key TEXT Llama Stack distribution API key --config TEXT Path to config file --help Show this message and exit. Commands: configure Configure Llama Stack Client CLI datasets Query details about available datasets on Llama... eval Run evaluation tasks eval_tasks Query details about available eval tasks type on... inference Query details about available inference endpoints on... inspect Query details about available versions on Llama... models Query details about available models on Llama Stack... post_training Query details about available post_training... providers Query details about available providers on Llama... scoring_functions Manage scoring functions shields Query details about available safety shields on... toolgroups Query details about available toolgroups on Llama... vector_dbs Query details about available vector dbs on... ``` After: ``` llama-stack-client --help Usage: llama-stack-client [OPTIONS] COMMAND [ARGS]... Welcome to the LlamaStackClient CLI Options: --version Show the version and exit. --endpoint TEXT Llama Stack distribution endpoint --api-key TEXT Llama Stack distribution API key --config TEXT Path to config file --help Show this message and exit. Commands: configure Configure Llama Stack Client CLI. datasets Manage datasets. eval Run evaluation tasks. eval_tasks Manage evaluation tasks. inference Inference (chat). inspect Inspect server configuration. models Manage GenAI models. post_training Post-training. providers Manage API providers. scoring_functions Manage scoring functions. shields Manage safety shield services. toolgroups Manage available tool groups. vector_dbs Manage vector databases. ``` [//]: # (## Documentation) [//]: # (- [ ] Added a Changelog entry if the change is significant) Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b07a6a1 - Browse repository at this point
Copy the full SHA b07a6a1View commit details -
fix: llama-stack-client providers list (#134)
# What does this PR do? currently this command always errors out due to using .items() on a list. ``` ╭─────────────────────────────────────────────────╮ │ Failed to list providers │ │ │ │ Error Type: AttributeError │ │ Details: 'list' object has no attribute 'items' │ ``` Fix the loop that looks at the list response ## Test Plan after fixing: output on Ollama distribution is the following: ``` ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ API ┃ Provider ID ┃ Provider Type ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ inference │ ollama │ remote::ollama │ │ inference │ sentence-transformers │ inline::sentence-transformers │ │ vector_io │ faiss │ inline::faiss │ │ safety │ llama-guard │ inline::llama-guard │ │ agents │ meta-reference │ inline::meta-reference │ │ telemetry │ meta-reference │ inline::meta-reference │ │ eval │ meta-reference │ inline::meta-reference │ │ datasetio │ huggingface │ remote::huggingface │ │ datasetio │ localfs │ inline::localfs │ │ scoring │ basic │ inline::basic │ │ scoring │ llm-as-judge │ inline::llm-as-judge │ │ scoring │ braintrust │ inline::braintrust │ │ tool_runtime │ brave-search │ remote::brave-search │ │ tool_runtime │ tavily-search │ remote::tavily-search │ │ tool_runtime │ code-interpreter │ inline::code-interpreter │ │ tool_runtime │ rag-runtime │ inline::rag-runtime │ └──────────────┴───────────────────────┴───────────────────────────────┘ ``` Signed-off-by: Charlie Doern <cdoern@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 930138a - Browse repository at this point
Copy the full SHA 930138aView commit details
Commits on Feb 12, 2025
-
refactor: update react_agent to use tool_config (#139)
# What does this PR do? - update react agent to use tool_config + system prompt override [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan ``` python -m examples.agents.react_agent ``` <img width="842" alt="image" src="https://github.com/user-attachments/assets/2bc2d2e8-a820-460b-b680-27e4b0e1f88b" /> [//]: # (## Documentation) [//]: # (- [ ] Added a Changelog entry if the change is significant)
Configuration menu - View commit details
-
Copy full SHA for b5dce10 - Browse repository at this point
Copy the full SHA b5dce10View commit details
Commits on Feb 13, 2025
-
feat: add type hints to event logger util (#140)
Summary: Test Plan: Run in llama-stack-apps python -m examples.agents.hello localhost 5001
Configuration menu - View commit details
-
Copy full SHA for 26f3c33 - Browse repository at this point
Copy the full SHA 26f3c33View commit details
Commits on Feb 14, 2025
-
feat: include complete turn response in Agent.create_turn (#141)
Summary: In #102, we made a turn's behavior more complete by automatically passing back the tool response and create another turn when client tool is used. However, this creates a problem with the non-streaming API where the response object only contains information since the last tool call. This PR is a hacky attemp to address this, by combining the Turn responses into one. I think ideally we should move all the loop logic to only be on the server side, where a turn would pause and the client SDK would pass tool reponses back to resume a turn. I also changed it to not yield ToolResponseMessage but instead yield a proper ToolExecutionStep event so that it can be treated the same as server side tool execution in terms of logging. I.e. it now outputs: "tool_execution> Tool:load_url Response:{"content": "\nToday Google announced that they have released the source code to PebbleOS. This is massive for Rebble, and will accelerate our" instead of "CustomTool> {"content": "\nToday Google announced that they have released the source code to PebbleOS. This is massive for Rebble, and will accelerate our efforts to " Test Plan: Added test in meta-llama/llama-stack#1078 Run a simple script with Agent and client tool. Observe the returned response has steps from both created turns. Turn( │ input_messages=[ │ │ UserMessage( │ │ │ content='load https://llama-stack.readthedocs.io/en/latest/introduction/index.html and summarize it', │ │ │ role='user', │ │ │ context=None │ │ ) │ ], │ output_message=CompletionMessage( │ │ content="The document from the given URL is about Google releasing the source code to PebbleOS, which is a significant development for Rebble. This allows Rebble to accelerate its efforts to produce new hardware. Rebble had been working on its own replacement firmware, RebbleOS, but the release of PebbleOS's source code will help Rebble to build a production-ready real-time OS for the Pebble.", │ │ role='assistant', │ │ stop_reason='end_of_turn', │ │ tool_calls=[] │ ), │ session_id='dec1c6c0-ed9b-42c1-97d7-906871acd5ba', │ started_at=datetime.datetime(2025, 2, 12, 16, 38, 14, 643186), │ steps=[ │ │ InferenceStep( │ │ │ api_model_response=CompletionMessage( │ │ │ │ content='', │ │ │ │ role='assistant', │ │ │ │ stop_reason='end_of_turn', │ │ │ │ tool_calls=[ │ │ │ │ │ ToolCall( │ │ │ │ │ │ arguments={'url': 'https://llama-stack.readthedocs.io/en/latest/introduction/index.html'}, │ │ │ │ │ │ call_id='5d09151b-8a53-4292-be8d-f21e134d5142', │ │ │ │ │ │ tool_name='load_url' │ │ │ │ │ ) │ │ │ │ ] │ │ │ ), │ │ │ step_id='d724a238-d02b-4d77-a4bc-a978a54979c6', │ │ │ step_type='inference', │ │ │ turn_id='0496c654-cd02-48bb-a2ab-d1a0a5e91aba', │ │ │ completed_at=datetime.datetime(2025, 2, 12, 16, 38, 15, 523310), │ │ │ started_at=datetime.datetime(2025, 2, 12, 16, 38, 14, 654535) │ │ ), │ │ ToolExecutionStep( │ │ │ step_id='49f19a5e-6a1e-4b1c-9232-fbafb82f2f89', │ │ │ step_type='tool_execution', │ │ │ tool_calls=[ │ │ │ │ ToolCall( │ │ │ │ │ arguments={'url': 'https://llama-stack.readthedocs.io/en/latest/introduction/index.html'}, │ │ │ │ │ call_id='5d09151b-8a53-4292-be8d-f21e134d5142', │ │ │ │ │ tool_name='load_url' │ │ │ │ ) │ │ │ ], │ │ │ tool_responses=[ │ │ │ │ ToolResponse( │ │ │ │ │ call_id='5d09151b-8a53-4292-be8d-f21e134d5142', │ │ │ │ │ content='{"content": "\nToday Google announced that they have released the source code to PebbleOS. This is massive for Rebble, and will accelerate our efforts to produce new hardware.\n\nPreviously, we have been working on our own replacement firmware: RebbleOS. As you can see by the commit history though, progress was slow. Building a production-ready realtime OS for the Pebble is no small feat, and although we were confident we’d get there given enough time, it was never our ideal path. Thanks to the hard work of many people both within Google and not, we finally have our hands on the original source code for PebbleOS. You can read Google’s blog post on this for even more information.\n\nThis does not mean we instantly have the ability to start developing updates for PebbleOS though, we first will need to spend some concentrated time getting it to build. But before we talk about that, let’s talk about Rebble itself.\n"}', │ │ │ │ │ tool_name='load_url' │ │ │ │ ) │ │ │ ], │ │ │ turn_id='0496c654-cd02-48bb-a2ab-d1a0a5e91aba', │ │ │ completed_at=datetime.datetime(2025, 2, 12, 16, 38, 15, 534830), │ │ │ started_at=datetime.datetime(2025, 2, 12, 16, 38, 15, 534756) │ │ ), │ │ InferenceStep( │ │ │ api_model_response=CompletionMessage( │ │ │ │ content="The document from the given URL is about Google releasing the source code to PebbleOS, which is a significant development for Rebble. This allows Rebble to accelerate its efforts to produce new hardware. Rebble had been working on its own replacement firmware, RebbleOS, but the release of PebbleOS's source code will help Rebble to build a production-ready real-time OS for the Pebble.", │ │ │ │ role='assistant', │ │ │ │ stop_reason='end_of_turn', │ │ │ │ tool_calls=[] │ │ │ ), │ │ │ step_id='5e6daa91-e689-4d7a-a7f9-d7c3da2eca5a', │ │ │ step_type='inference', │ │ │ turn_id='8f65d88d-7643-4dd7-acc7-48cd9e8aa449', │ │ │ completed_at=datetime.datetime(2025, 2, 12, 16, 38, 16, 179107), │ │ │ started_at=datetime.datetime(2025, 2, 12, 16, 38, 15, 561449) │ │ ) │ ], │ turn_id='0496c654-cd02-48bb-a2ab-d1a0a5e91aba', │ completed_at=datetime.datetime(2025, 2, 12, 16, 38, 16, 191199), │ output_attachments=[] ) ```
Configuration menu - View commit details
-
Copy full SHA for 8652757 - Browse repository at this point
Copy the full SHA 8652757View commit details -
sync stainless 0.1.3 cut (#144)
# What does this PR do? - as title ## Test Plan ``` pytest -v -s --nbval-lax ./docs/notebooks/Llama_Stack_Benchmark_Evals.ipynb ``` <img width="687" alt="image" src="https://github.com/user-attachments/assets/ef291dc2-a822-4ed5-a3fc-956703a3772f" /> [//]: # (## Documentation) [//]: # (- [ ] Added a Changelog entry if the change is significant)
Configuration menu - View commit details
-
Copy full SHA for 74b98eb - Browse repository at this point
Copy the full SHA 74b98ebView commit details -
Update the example to reflect current API (#131)
# What does this PR do? Update the example to reflect current API ## Test Plan Copy paste the example in the README and check the output. Without this change an error is raised: ```python python3 hello.py Traceback (most recent call last): File "/Users/bmuthuka/wa/meta-llama/baiju-experiments/hello.py", line 8, in <module> response = client.inference.chat_completion( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/envs/myml/lib/python3.12/site-packages/llama_stack_client/_utils/_utils.py", line 274, in wrapper raise TypeError(msg) TypeError: Missing required arguments; Expected either ('messages' and 'model_id') or ('messages', 'model_id' and 'stream') arguments to be given ```
Configuration menu - View commit details
-
Copy full SHA for d6e855e - Browse repository at this point
Copy the full SHA d6e855eView commit details -
feat: enable_persist: sync updates from stainless branch: yanxi0830/d…
…ev (#145) # What does this PR do? - adapt to meta-llama/llama-stack#1012 [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan [Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.*] [//]: # (## Documentation) [//]: # (- [ ] Added a Changelog entry if the change is significant)
Configuration menu - View commit details
-
Copy full SHA for 59a02f0 - Browse repository at this point
Copy the full SHA 59a02f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad6ffc6 - Browse repository at this point
Copy the full SHA ad6ffc6View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.1.2...v0.1.3