Skip to content
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

fix: llama-stack-client providers list #134

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Conversation

cdoern
Copy link
Contributor

@cdoern cdoern commented Feb 11, 2025

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           │
└──────────────┴───────────────────────┴───────────────────────────────┘

currently this command always errors out due to using .items() on a list.

Fix the loop that looks at the list response

Signed-off-by: Charlie Doern <[email protected]>
Copy link
Contributor

@booxter booxter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed it works. Code looks good too.

@raghotham raghotham merged commit 930138a into meta-llama:main Feb 11, 2025
2 checks passed
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.

5 participants