-
Notifications
You must be signed in to change notification settings - Fork 58
LCORE-169: Provide initial set of opinionated & tested llama-stack co… #424
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # Example llama-stack configuration for Google Gemini inference | ||
| # | ||
| # Contributed by @eranco74 (2025-08). See https://github.com/rh-ecosystem-edge/assisted-chat/blob/main/template.yaml#L282-L386 | ||
| # This file shows how to integrate Gemini with LCS. | ||
| # | ||
| # Notes: | ||
| # - You will need valid Gemini API credentials to run this. | ||
| # - You will need a postgres instance to run this config. | ||
| # | ||
| version: 2 | ||
| image_name: gemini-config | ||
| apis: | ||
| - agents | ||
| - datasetio | ||
| - eval | ||
| - files | ||
| - inference | ||
| - safety | ||
| - scoring | ||
| - telemetry | ||
| - tool_runtime | ||
| - vector_io | ||
| providers: | ||
| inference: | ||
| - provider_id: ${LLAMA_STACK_INFERENCE_PROVIDER} | ||
| provider_type: remote::gemini | ||
| config: | ||
| api_key: ${env.GEMINI_API_KEY} | ||
| vector_io: [] | ||
| files: [] | ||
| safety: [] | ||
| agents: | ||
| - provider_id: meta-reference | ||
| provider_type: inline::meta-reference | ||
| config: | ||
| persistence_store: | ||
| type: postgres | ||
| host: ${env.LLAMA_STACK_POSTGRES_HOST} | ||
| port: ${env.LLAMA_STACK_POSTGRES_PORT} | ||
| db: ${env.LLAMA_STACK_POSTGRES_NAME} | ||
| user: ${env.LLAMA_STACK_POSTGRES_USER} | ||
| password: ${env.LLAMA_STACK_POSTGRES_PASSWORD} | ||
| responses_store: | ||
| type: postgres | ||
| host: ${env.LLAMA_STACK_POSTGRES_HOST} | ||
| port: ${env.LLAMA_STACK_POSTGRES_PORT} | ||
| db: ${env.LLAMA_STACK_POSTGRES_NAME} | ||
| user: ${env.LLAMA_STACK_POSTGRES_USER} | ||
| password: ${env.LLAMA_STACK_POSTGRES_PASSWORD} | ||
| telemetry: | ||
| - provider_id: meta-reference | ||
| provider_type: inline::meta-reference | ||
| config: | ||
| service_name: "${LLAMA_STACK_OTEL_SERVICE_NAME}" | ||
| sinks: ${LLAMA_STACK_TELEMETRY_SINKS} | ||
| sqlite_db_path: ${STORAGE_MOUNT_PATH}/sqlite/trace_store.db | ||
| eval: [] | ||
| datasetio: [] | ||
| scoring: | ||
| - provider_id: basic | ||
| provider_type: inline::basic | ||
| config: {} | ||
| - provider_id: llm-as-judge | ||
| provider_type: inline::llm-as-judge | ||
| config: {} | ||
| tool_runtime: | ||
| - provider_id: rag-runtime | ||
| provider_type: inline::rag-runtime | ||
| config: {} | ||
| - provider_id: model-context-protocol | ||
| provider_type: remote::model-context-protocol | ||
| config: {} | ||
| metadata_store: | ||
| type: sqlite | ||
| db_path: ${STORAGE_MOUNT_PATH}/sqlite/registry.db | ||
| inference_store: | ||
| type: postgres | ||
| host: ${env.LLAMA_STACK_POSTGRES_HOST} | ||
| port: ${env.LLAMA_STACK_POSTGRES_PORT} | ||
| db: ${env.LLAMA_STACK_POSTGRES_NAME} | ||
| user: ${env.LLAMA_STACK_POSTGRES_USER} | ||
| password: ${env.LLAMA_STACK_POSTGRES_PASSWORD} | ||
| models: | ||
| - metadata: {} | ||
| model_id: ${LLAMA_STACK_2_0_FLASH_MODEL} | ||
| provider_id: ${LLAMA_STACK_INFERENCE_PROVIDER} | ||
| provider_model_id: ${LLAMA_STACK_2_0_FLASH_MODEL} | ||
| model_type: llm | ||
| - metadata: {} | ||
| model_id: ${LLAMA_STACK_2_5_PRO_MODEL} | ||
| provider_id: ${LLAMA_STACK_INFERENCE_PROVIDER} | ||
| provider_model_id: ${LLAMA_STACK_2_5_PRO_MODEL} | ||
| model_type: llm | ||
| - metadata: {} | ||
| model_id: ${LLAMA_STACK_2_5_FLASH_MODEL} | ||
| provider_id: ${LLAMA_STACK_INFERENCE_PROVIDER} | ||
| provider_model_id: ${LLAMA_STACK_2_5_FLASH_MODEL} | ||
| model_type: llm | ||
| shields: [] | ||
| vector_dbs: [] | ||
| datasets: [] | ||
| scoring_fns: [] | ||
| benchmarks: [] | ||
| tool_groups: | ||
| - toolgroup_id: builtin::rag | ||
| provider_id: rag-runtime | ||
| - toolgroup_id: mcp::assisted | ||
| provider_id: model-context-protocol | ||
| mcp_endpoint: | ||
| uri: "${MCP_SERVER_URL}" | ||
| server: | ||
| port: ${LLAMA_STACK_SERVER_PORT} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Example llama-stack configuration for OpenAI inference + FAISS (RAG) | ||
| # | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trim trailing spaces and add newline at EOF (yamllint/CI). Multiple trailing spaces; missing newline at EOF. These are typical CI blockers. Also applies to: 6-6, 18-18, 28-29, 32-32, 36-36, 59-59, 68-68, 81-81, 83-83 🧰 Tools🪛 YAMLlint (1.37.1)[error] 2-2: trailing spaces (trailing-spaces) 🤖 Prompt for AI Agents |
||
| # Notes: | ||
| # - You will need an OpenAI API key | ||
| # - You can generate the vector index with the rag-content tool (https://github.com/lightspeed-core/rag-content) | ||
| # | ||
| version: 2 | ||
| image_name: openai-faiss-config | ||
|
|
||
| apis: | ||
| - agents | ||
| - inference | ||
| - vector_io | ||
| - tool_runtime | ||
| - safety | ||
|
|
||
| models: | ||
| - model_id: gpt-test | ||
| provider_id: openai # This ID is a reference to 'providers.inference' | ||
| model_type: llm | ||
| provider_model_id: gpt-4o-mini | ||
|
|
||
| - model_id: sentence-transformers/all-mpnet-base-v2 | ||
| metadata: | ||
| embedding_dimension: 768 | ||
| model_type: embedding | ||
| provider_id: sentence-transformers # This ID is a reference to 'providers.inference' | ||
| provider_model_id: /home/USER/lightspeed-stack/embedding_models/all-mpnet-base-v2 | ||
|
|
||
| providers: | ||
| inference: | ||
| - provider_id: sentence-transformers | ||
| provider_type: inline::sentence-transformers | ||
| config: {} | ||
|
|
||
| - provider_id: openai | ||
| provider_type: remote::openai | ||
| config: | ||
| api_key: ${env.OPENAI_API_KEY} | ||
|
|
||
| agents: | ||
|
Comment on lines
+31
to
+41
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix indentation to 4 spaces per level under providers and nested maps. YAML lint expects 4-space indentation. Current blocks under providers/config/stores are under-indented by 2 spaces. -providers:
- inference:
- - provider_id: sentence-transformers
- provider_type: inline::sentence-transformers
- config: {}
-
- - provider_id: openai
- provider_type: remote::openai
- config:
- api_key: ${env.OPENAI_API_KEY}
-
- agents:
- - provider_id: meta-reference
- provider_type: inline::meta-reference
- config:
- persistence_store:
- type: sqlite
- db_path: .llama/distributions/ollama/agents_store.db
- responses_store:
- type: sqlite
- db_path: .llama/distributions/ollama/responses_store.db
-
- safety:
- - provider_id: llama-guard
- provider_type: inline::llama-guard
- config:
- excluded_categories: []
-
- vector_io:
- - provider_id: ocp-docs
- provider_type: inline::faiss
- config:
- kvstore:
- type: sqlite
- db_path: /home/USER/lightspeed-stack/vector_dbs/ocp_docs/faiss_store.db
- namespace: null
-
- tool_runtime:
- - provider_id: rag-runtime
- provider_type: inline::rag-runtime
- config: {}
+providers:
+ inference:
+ - provider_id: sentence-transformers
+ provider_type: inline::sentence-transformers
+ config: {}
+
+ - provider_id: openai
+ provider_type: remote::openai
+ config:
+ api_key: ${env.OPENAI_API_KEY}
+
+ agents:
+ - provider_id: meta-reference
+ provider_type: inline::meta-reference
+ config:
+ persistence_store:
+ type: sqlite
+ db_path: .llama/distributions/ollama/agents_store.db
+ responses_store:
+ type: sqlite
+ db_path: .llama/distributions/ollama/responses_store.db
+
+ safety:
+ - provider_id: llama-guard
+ provider_type: inline::llama-guard
+ config:
+ excluded_categories: []
+
+ vector_io:
+ - provider_id: ocp-docs
+ provider_type: inline::faiss
+ config:
+ kvstore:
+ type: sqlite
+ db_path: /home/USER/lightspeed-stack/vector_dbs/ocp_docs/faiss_store.db
+ namespace: null
+
+ tool_runtime:
+ - provider_id: rag-runtime
+ provider_type: inline::rag-runtime
+ config: {}Also applies to: 45-51, 56-66, 67-71 🧰 Tools🪛 YAMLlint (1.37.1)[warning] 31-31: wrong indentation: expected 4 but found 2 (indentation) [error] 32-32: trailing spaces (trailing-spaces) [error] 36-36: trailing spaces (trailing-spaces) [warning] 39-39: wrong indentation: expected 8 but found 6 (indentation) 🤖 Prompt for AI Agents |
||
| - provider_id: meta-reference | ||
| provider_type: inline::meta-reference | ||
| config: | ||
| persistence_store: | ||
| type: sqlite | ||
| db_path: .llama/distributions/ollama/agents_store.db | ||
| responses_store: | ||
| type: sqlite | ||
| db_path: .llama/distributions/ollama/responses_store.db | ||
|
|
||
| safety: | ||
| - provider_id: llama-guard | ||
| provider_type: inline::llama-guard | ||
| config: | ||
| excluded_categories: [] | ||
|
|
||
| vector_io: | ||
| - provider_id: ocp-docs | ||
| provider_type: inline::faiss | ||
| config: | ||
| kvstore: | ||
| type: sqlite | ||
| db_path: /home/USER/lightspeed-stack/vector_dbs/ocp_docs/faiss_store.db | ||
| namespace: null | ||
|
|
||
| tool_runtime: | ||
| - provider_id: rag-runtime | ||
| provider_type: inline::rag-runtime | ||
| config: {} | ||
|
|
||
| # Enable the RAG tool | ||
| tool_groups: | ||
| - provider_id: rag-runtime | ||
| toolgroup_id: builtin::rag | ||
| args: null | ||
| mcp_endpoint: null | ||
|
|
||
| vector_dbs: | ||
| - embedding_dimension: 768 | ||
| embedding_model: sentence-transformers/all-mpnet-base-v2 | ||
| provider_id: ocp-docs # This ID is a reference to 'providers.vector_io' | ||
| vector_db_id: openshift-index # This ID was defined during index generation | ||
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.
Fix relative links to examples from docs/ to examples/.
From docs/, the correct relative path is ../examples/...
Update FAISS example reference:
Update pgvector example reference:
Update vLLM Llama example reference:
Update OpenAI example reference:
Also applies to: 152-153, 208-209, 241-242
🤖 Prompt for AI Agents