Skip to content
Closed
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
104 changes: 0 additions & 104 deletions .github/workflows/ci.yml

This file was deleted.

24 changes: 6 additions & 18 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,11 @@ name: Validation Checks

on:
pull_request:
branches: [ main ]
branches:
- main
- rhdh-*

jobs:
validate-prompt:
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: ./scripts/python-scripts
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Environment
run: pip3 install -r requirements.txt
- name: Validate prompt
run: python3 sync.py -t validate
validate-yaml:
runs-on: ubuntu-latest
permissions:
Expand All @@ -47,6 +35,6 @@ jobs:
node-version: '22.21'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable --frozen-lockfile
- name: Run Prettier
run: yarn verify
run: yarn install --immutable --frozen-lockfile
- name: Validate YAML files
run: make validate-yaml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
embeddings_model
vector_db

rag-content
values.env

.venv
Expand Down
82 changes: 0 additions & 82 deletions Containerfile

This file was deleted.

45 changes: 39 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,43 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
RAG_CONTENT_IMAGE ?= quay.io/redhat-ai-dev/rag-content:release-1.9-lcs
RAG_CONTENT_IMAGE ?= quay.io/redhat-ai-dev/rag-content:release-1.9-lls-0.4.3
QUESTION_VALIDATION_TAG ?= 0.1.17
QUESTION_VALIDATION_URL ?= https://raw.githubusercontent.com/lightspeed-core/lightspeed-providers/refs/tags/$(QUESTION_VALIDATION_TAG)/resources/external_providers/inline/safety/lightspeed_question_validity.yaml
COMPOSE ?= podman compose
WITH_OLLAMA ?= true

ifeq ($(WITH_OLLAMA),false)
LOCAL_COMPOSE_FILES := -f compose/compose.yaml
else
LOCAL_COMPOSE_FILES := -f compose/compose.yaml -f compose/compose.ollama.yaml
endif

VENV := $(CURDIR)/scripts/python-scripts/.venv
PYTHON := $(VENV)/bin/python3
PIP := $(VENV)/bin/pip3

.PHONY: default
default: help

.PHONY: get-rag
get-rag: ## Download a copy of the RAG embedding model and vector database
podman create --replace --name tmp-rag-container $(RAG_CONTENT_IMAGE) true
rm -rf vector_db embeddings_model
podman cp tmp-rag-container:/rag/vector_db vector_db
podman cp tmp-rag-container:/rag/embeddings_model embeddings_model
rm -rf rag-content
mkdir -p rag-content
podman cp tmp-rag-container:/rag/vector_db rag-content
podman cp tmp-rag-container:/rag/embeddings_model rag-content
podman rm tmp-rag-container

.PHONY: local-up
local-up: ## Start local compose services (WITH_OLLAMA=true|false)
$(COMPOSE) $(LOCAL_COMPOSE_FILES) up -d

.PHONY: local-down
local-down: ## Stop local compose services
$(COMPOSE) $(LOCAL_COMPOSE_FILES) down

.PHONY: help
help: ## Show this help screen
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
Expand All @@ -36,8 +59,9 @@ help: ## Show this help screen
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-33s\033[0m %s\n", $$1, $$2}'
@echo ''

.PHONY: update-question-validation
update-question-validation:
curl -o ./config/providers.d/inline/safety/lightspeed_question_validity.yaml https://raw.githubusercontent.com/lightspeed-core/lightspeed-providers/refs/tags/0.1.17/resources/external_providers/inline/safety/lightspeed_question_validity.yaml
curl -o ./config/providers.d/inline/safety/lightspeed_question_validity.yaml $(QUESTION_VALIDATION_URL)

$(VENV)/bin/activate: ./scripts/python-scripts/requirements.txt
python3 -m venv $(VENV)
Expand All @@ -49,9 +73,18 @@ define run_sync
$(PYTHON) sync.py -t $(1)
endef

.PHONY: validate-prompt-templates update-prompt-templates
.PHONY: validate-prompt-templates
validate-prompt-templates: $(VENV)/bin/activate
$(call run_sync,validate)

.PHONY: update-prompt-templates
update-prompt-templates: $(VENV)/bin/activate
$(call run_sync,update)

.PHONY: validate-yaml
validate-yaml:
yarn verify

.PHONY: format-yaml
format-yaml:
yarn format
Loading