File size: 2,278 Bytes
b27eb78
 
 
 
 
 
 
 
 
 
 
 
150cd80
b27eb78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422e708
b27eb78
 
 
 
422e708
 
b27eb78
150cd80
 
 
 
 
 
b27eb78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ifeq (,$(wildcard .env))
$(error .env file is missing. Please create one based on .env.example. Run: "cp .env.example .env" and fill in the missing values.)
endif

include .env

export UV_PROJECT_ENVIRONMENT=.venv-online
export PYTHONPATH = .

# --- Default Values ---

CHECK_DIRS := .
RETRIEVER_CONFIG ?= configs/compute_rag_vector_index_openai_contextual.yaml

# --- Utilities ---

help:
	@grep -E '^[a-zA-Z0-9 -]+:.*#'  Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done

check-config:
	@if [ ! -f "$(RETRIEVER_CONFIG)" ]; then \
		echo "Error: Retriever config file '$(RETRIEVER_CONFIG)' does not exist"; \
		exit 1; \
	else \
		echo "Found retriever config file at '$(RETRIEVER_CONFIG)'"; \
	fi

# --- Infrastructure --- 

local-docker-infrastructure-up:
	docker compose -f ../infrastructure/docker/docker-compose.yml up --build -d 

local-docker-infrastructure-stop:
	docker compose -f ../infrastructure/docker/docker-compose.yml stop

local-infrastructure-up: local-docker-infrastructure-up

local-infrastructure-stop: local-docker-infrastructure-stop

local-infrastructure-down:
	docker compose -f ../infrastructure/docker/docker-compose.yml down
# --- Run ---

run_agent_app: check-config
	uv run python -m tools.app --retriever-config-path=$(RETRIEVER_CONFIG) --ui

run_agent_query: check-config
	uv run python -m tools.app --retriever-config-path=$(RETRIEVER_CONFIG) --query "What pricing objections have been raised?"

evaluate_agent: check-config
	uv run python -m tools.evaluate_app --retriever-config-path=$(RETRIEVER_CONFIG)

run_conversation_analysis_ui: # Launch Conversation Analysis Dashboard
	uv run python conversation_analysis_app.py

run_customer_profile_dashboard: # Launch Customer Profile Analysis Dashboard
	uv run python -m tools.customer_profile_app

run_user_interaction_dashboard: # Launch User Interaction Analysis Dashboard
	uv run python tools/user_interaction_ui.py

# --- QA ---

format-fix:
	uv run ruff format $(CHECK_DIRS)
	uv run ruff check --select I --fix 

lint-fix:
	uv run ruff check --fix

format-check:
	uv run ruff format --check $(CHECK_DIRS) 
	uv run ruff check -e
	uv run ruff check --select I -e

lint-check:
	uv run ruff check $(CHECK_DIRS)