Commit fc2f6d4
committed
Adding API key support
Summary:
Test Plan:
Try to config with no args
```
llama-stack-client configure
> Enter the host name of the Llama Stack distribution server: api.hostname.com
> Enter the port number of the Llama Stack distribution server: 80
> Enter the API key (leave empty if no key is needed): _API_KEY_
> Is Llama Stack distribution server using HTTPS? (y/n): n
Done! You can now use the Llama Stack Client CLI with endpoint https://api.hostname.com:80
```
Config with args
```
llama-stack-client configure --endpoint=https://api.hostname.com --api-key='_API_KEY_'
Done! You can now use the Llama Stack Client CLI with endpoint https://api.hostname.com
```
Try listing the models
```
llama-stack-client models list
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ identifier ┃ provider_id ┃ provider_resource_id ┃ metadata ┃ model_type ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━┩
│ llama3.1-8b-instruct │ meta-llama │ llama3.1-8b-instruct │ {} │ llm │
│ llama3.3-70b-instruct │ meta-llama │ llama3.3-70b-instruct │ {} │ llm │
│ llama3.4-17b-instruct │ meta-llama │ llama3.4-17b-instruct │ {} │ llm │
└───────────────────────┴─────────────┴───────────────────────┴──────────┴────────────┘
```1 parent 6b6be35 commit fc2f6d4
File tree
3 files changed
+42
-6
lines changed- src/llama_stack_client
- lib/cli
3 files changed
+42
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| 136 | + | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| 306 | + | |
303 | 307 | | |
304 | 308 | | |
305 | 309 | | |
| |||
329 | 333 | | |
330 | 334 | | |
331 | 335 | | |
| 336 | + | |
| 337 | + | |
332 | 338 | | |
333 | 339 | | |
334 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
56 | 82 | | |
57 | 83 | | |
58 | 84 | | |
59 | 85 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 86 | + | |
63 | 87 | | |
64 | 88 | | |
65 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
0 commit comments