Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ start-llama-stack-container: build-llama-stack-image ## Start llama-stack contai
-e WATSONX_API_KEY \
-e LITELLM_DROP_PARAMS=true \
-e AWS_BEARER_TOKEN_BEDROCK \
-e LLAMA_STACK_LOGGING=$${LLAMA_STACK_LOGGING:-} \
-e OGX_LOGGING=$${OGX_LOGGING:-} \
-e FAISS_VECTOR_STORE_ID=$${FAISS_VECTOR_STORE_ID:-} \
-e RH_SERVER_OKP \
-e SOLR_URL \
Expand Down Expand Up @@ -130,7 +130,7 @@ clean-llama-stack: remove-llama-stack-container ## Remove container and image

run-llama-stack: ## Start Llama Stack with enriched config (for local service mode)
uv run src/llama_stack_configuration.py -c $(CONFIG) -i $(LLAMA_STACK_CONFIG) -o $(LLAMA_STACK_CONFIG) && \
uv run llama stack run $(LLAMA_STACK_CONFIG)
uv run ogx stack run $(LLAMA_STACK_CONFIG)

test-unit: ## Run the unit tests
@echo "Running unit tests..."
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
# AWS Bedrock
- AWS_BEARER_TOKEN_BEDROCK=${AWS_BEARER_TOKEN_BEDROCK:-}
# Enable debug logging if needed
- LLAMA_STACK_LOGGING=${LLAMA_STACK_LOGGING:-}
- OGX_LOGGING=${OGX_LOGGING:-}
# FAISS test and inline RAG config
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
# Prevent HuggingFace Hub update checks (HTTP 429 rate-limiting in CI from parallel jobs).
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
# AWS Bedrock
- AWS_BEARER_TOKEN_BEDROCK=${AWS_BEARER_TOKEN_BEDROCK:-}
# Enable debug logging if needed
- LLAMA_STACK_LOGGING=${LLAMA_STACK_LOGGING:-}
- OGX_LOGGING=${OGX_LOGGING:-}
# FAISS test
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
# Prevent HuggingFace Hub update checks (HTTP 429 rate-limiting in CI from parallel jobs).
Expand Down
544 changes: 359 additions & 185 deletions docs/devel_doc/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/devel_doc/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ make run CONFIG=examples/lightspeed-stack-azure-entraid-service.yaml

| Name | Type | Pip Dependencies | Supported in LCS |
|------------------------|--------|------------------------------------------------------------------------------------------------------|:----------------:|
| rag-runtime | inline | `chardet`,`pypdf`, `tqdm`, `numpy`, `scikit-learn`, `scipy`, `nltk`, `sentencepiece`, `transformers` | ✅ |
| file-search | inline | `chardet`,`pypdf`, `tqdm`, `numpy`, `scikit-learn`, `scipy`, `nltk`, `sentencepiece`, `transformers` | ✅ |
| bing-search | remote | `requests` | ❌ |
| brave-search | remote | `requests` | ❌ |
| model-context-protocol | remote | `mcp>=1.8.1` | ✅ |
Expand Down
79 changes: 16 additions & 63 deletions examples/azure-run.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
version: 2
image_name: azure-configuration

apis:
- agents
- responses
- batches
- datasetio
- eval
- files
- inference
- safety
- scoring
- tool_runtime
- conversations
- vector_io

benchmarks: []
datasets: []
# external_providers_dir: /opt/app-root/src/.llama/providers.d

providers:
Expand All @@ -40,19 +34,10 @@ providers:
storage_dir: ~/.llama/storage/files
provider_id: meta-reference-files
provider_type: inline::localfs
safety:
- config:
excluded_categories: []
provider_id: llama-guard
provider_type: inline::llama-guard
scoring:
- config: {}
provider_id: basic
provider_type: inline::basic
tool_runtime:
- config: {} # Enable the RAG tool
provider_id: rag-runtime
provider_type: inline::rag-runtime
provider_id: file-search
provider_type: inline::file-search
- config: {} # Enable MCP (Model Context Protocol) support
provider_id: model-context-protocol
provider_type: remote::model-context-protocol
Expand All @@ -63,45 +48,21 @@ providers:
backend: kv_rag
provider_id: faiss
provider_type: inline::faiss
agents:
responses:
- config:
persistence:
agent_state:
namespace: agents_state
backend: kv_default
responses:
table_name: agents_responses
backend: sql_default
provider_id: meta-reference
provider_type: inline::meta-reference
provider_id: builtin
provider_type: inline::builtin
batches:
- config:
kvstore:
namespace: batches_store
backend: kv_default
sqlstore:
table_name: batches
backend: sql_default
provider_id: reference
provider_type: inline::reference
datasetio:
- config:
kvstore:
namespace: huggingface_datasetio
backend: kv_default
provider_id: huggingface
provider_type: remote::huggingface
- config:
kvstore:
namespace: localfs_datasetio
backend: kv_default
provider_id: localfs
provider_type: inline::localfs
eval:
- config:
kvstore:
namespace: eval_store
backend: kv_default
provider_id: meta-reference
provider_type: inline::meta-reference
scoring_fns: []
server:
port: 8321
storage:
Expand All @@ -128,8 +89,11 @@ storage:
table_name: openai_conversations
backend: sql_default
prompts:
namespace: prompts
backend: kv_default
table_name: prompts
backend: sql_default
connectors:
table_name: connectors
backend: sql_default
registered_resources:
models:
- model_id: gpt-4o-mini
Expand All @@ -142,25 +106,14 @@ registered_resources:
provider_model_id: all-mpnet-base-v2
metadata:
embedding_dimension: 768
shields:
- shield_id: llama-guard
provider_id: llama-guard
provider_shield_id: openai/gpt-4o-mini
vector_stores:
- embedding_dimension: 768
embedding_model: sentence-transformers/all-mpnet-base-v2
provider_id: faiss
vector_store_id: ${env.FAISS_VECTOR_STORE_ID}
datasets: []
scoring_fns: []
benchmarks: []
tool_groups:
- toolgroup_id: builtin::rag
provider_id: rag-runtime
vector_stores:
default_provider_id: faiss
default_embedding_model:
provider_id: sentence-transformers
model_id: all-mpnet-base-v2
safety:
default_shield_id: llama-guard
distro_name: azure-configuration
84 changes: 16 additions & 68 deletions examples/bedrock-run.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
version: 2

apis:
- agents
- responses
- batches
- datasetio
- eval
- files
- inference
- safety
- scoring
- tool_runtime
- conversations
- vector_io

benchmarks: []
datasets: []
image_name: starter
# external_providers_dir: /opt/app-root/src/.llama/providers.d

providers:
Expand All @@ -39,26 +33,10 @@ providers:
storage_dir: ${env.SQLITE_STORE_DIR:=~/.llama/storage/files}
provider_id: meta-reference-files
provider_type: inline::localfs
safety:
- config:
excluded_categories: []
provider_id: llama-guard
provider_type: inline::llama-guard
scoring:
- provider_id: basic
provider_type: inline::basic
config: {}
- provider_id: llm-as-judge
provider_type: inline::llm-as-judge
config: {}
- provider_id: braintrust
provider_type: inline::braintrust
config:
openai_api_key: '********'
tool_runtime:
- config: {} # Enable the RAG tool
provider_id: rag-runtime
provider_type: inline::rag-runtime
provider_id: file-search
provider_type: inline::file-search
- config: {} # Enable MCP (Model Context Protocol) support
provider_id: model-context-protocol
provider_type: remote::model-context-protocol
Expand All @@ -69,45 +47,21 @@ providers:
backend: kv_default
provider_id: faiss
provider_type: inline::faiss
agents:
responses:
- config:
persistence:
agent_state:
namespace: agents_state
backend: kv_default
responses:
table_name: agents_responses
backend: sql_default
provider_id: meta-reference
provider_type: inline::meta-reference
provider_id: builtin
provider_type: inline::builtin
batches:
- config:
kvstore:
namespace: batches_store
backend: kv_default
sqlstore:
table_name: batches
backend: sql_default
provider_id: reference
provider_type: inline::reference
datasetio:
- config:
kvstore:
namespace: huggingface_datasetio
backend: kv_default
provider_id: huggingface
provider_type: remote::huggingface
- config:
kvstore:
namespace: localfs_datasetio
backend: kv_default
provider_id: localfs
provider_type: inline::localfs
eval:
- config:
kvstore:
namespace: eval_store
backend: kv_default
provider_id: meta-reference
provider_type: inline::meta-reference
scoring_fns: []
server:
port: 8321
storage:
Expand All @@ -131,8 +85,11 @@ storage:
table_name: openai_conversations
backend: sql_default
prompts:
namespace: prompts
backend: kv_default
table_name: prompts
backend: sql_default
connectors:
table_name: connectors
backend: sql_default
registered_resources:
models:
- model_id: custom-bedrock-model
Expand All @@ -145,19 +102,10 @@ registered_resources:
provider_model_id: all-mpnet-base-v2
metadata:
embedding_dimension: 768
shields:
- shield_id: llama-guard
provider_id: llama-guard
provider_shield_id: openai/gpt-4o-mini
vector_stores: []
datasets: []
scoring_fns: []
benchmarks: []
tool_groups:
- toolgroup_id: builtin::rag # Register the RAG tool
provider_id: rag-runtime
vector_stores:
default_provider_id: faiss
default_embedding_model:
provider_id: sentence-transformers
model_id: all-mpnet-base-v2
distro_name: starter
39 changes: 39 additions & 0 deletions examples/lightspeed-stack-shields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lightspeed Core Service (LCS)
service:
host: localhost
port: 8080
auth_enabled: false
workers: 1
color_log: true
access_log: true
llama_stack:
use_as_library_client: false
url: http://localhost:8321
api_key: xyzzy
user_data_collection:
feedback_enabled: true
feedback_storage: "/tmp/data/feedback"
transcripts_enabled: true
transcripts_storage: "/tmp/data/transcripts"
authentication:
module: "noop"
# Shields are owned by LCORE. shield_id must be one of the supported capability IDs:
# - lightspeed_question_validity
# - lightspeed_pii_redaction
shields:
- shield_id: lightspeed_question_validity
provider_id: lightspeed_question_validity
# Model used by the question-validity guardrail
provider_shield_id: gpt-4o-mini
# Optional overrides (defaults come from constants):
# params:
# model_prompt: "..."
# invalid_question_response: "..."
- shield_id: lightspeed_pii_redaction
provider_id: lightspeed_pii_redaction
provider_shield_id: lightspeed_pii_redaction
params:
case_sensitive: false
rules:
- pattern: '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}'
replacement: '[REDACTED_EMAIL]'
Loading
Loading