-
Notifications
You must be signed in to change notification settings - Fork 92
[CLI] llama-stack-client CLI for querying server distro #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I should be able to just configure the client cli to point to a host by providing an API key if needed. $ llama-stack-client configure After that, I should be able to do: $ llama-stack-client <models|memory_banks|shields> <list|get> without having to specify host/port each time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes mainly for Raghu's comment on doing a configuration first and then reusing those values for contacting the distribution server.
A small nit -- can the cli
directory be placed until src/llama_stack_client
instead of inside src/llama_stack_client/lib/
I put it to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty reasonable to me, but I want to have @raghotham take one look at it since he has had a lot of thoughts on how precisely this needs to work.
type=str, | ||
help="Llama Stack distribution port number", | ||
) | ||
self.parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should have this one if we have separate host and port arguments. It feels confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that if we have an endpoint like https://llama-stack.together.ai
, we don't need to specify separate host:port args.
|
||
self.endpoint = get_config().get("endpoint") | ||
self.parser.add_argument( | ||
"--endpoint", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think @raghotham wanted things to work like the aws
CLI. i.e., there's a notion of a "profile"... its default value is "default". And you can update the default. And then each command gets an optional "profile" name which it uses to look up the corresponding YAML and gets all its values from there.
Specifically, we should never have an endpoint here (and in all commands) but only a "name" which represents a link to the YAML.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, my understanding is that for now we only have endpoint to store in "profile", but I could remove this --endpoint
s.t. we read from "profile" config only.
f.write( | ||
yaml.dump( | ||
{ | ||
"endpoint": endpoint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently saves endpoint
only, could introduce a map later if we want to store different endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in!
These are the changes we had made on top of whatever Stainless generates. We are going to get them into this repository now so (a) future updates can just be simple PRs from Stainless and (b) we can directly publish from the repository.
Automated Release PR --- ## 0.1.0-alpha.3 (2025-06-27) Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](llamastack/llama-stack-client-python@v0.1.0-alpha.2...v0.1.0-alpha.3) ### Features * **api:** update via SDK Studio ([e87f225](llamastack@e87f225)) * make custom code changes ([llamastack#3](llamastack#3)) ([83fa371](llamastack@83fa371)) --- This pull request is managed by Stainless's [GitHub App](https://github.com/apps/stainless-app). The [semver version number](https://semver.org/#semantic-versioning-specification-semver) is based on included [commit messages](https://www.conventionalcommits.org/en/v1.0.0/). Alternatively, you can manually set the version number in the title of this pull request. For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request. 🔗 Stainless [website](https://www.stainlessapi.com) 📚 Read the [docs](https://app.stainlessapi.com/docs) 🙋 [Reach out](mailto:support@stainlessapi.com) for help or questions --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
CLI Reference
llama-stack-client
llama-stack-client configure
llama-stack-client models list
llama-stack-client models get
llama-stack-client memory_banks list
llama-stack-client shields list