-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.sh
More file actions
executable file
·96 lines (84 loc) · 2.58 KB
/
quickstart.sh
File metadata and controls
executable file
·96 lines (84 loc) · 2.58 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# ACE RAG Gemini Quick Start Script
# This script helps you set up and verify the installation
set -e
echo "=================================================="
echo " ACE RAG Gemini - Quick Start Setup"
echo "=================================================="
echo ""
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Check Python version
echo "Checking Python version..."
python_version=$(python3 --version 2>&1 | awk '{print $2}')
echo "Found Python $python_version"
if ! python3 -c 'import sys; exit(0 if sys.version_info >= (3, 9) else 1)' 2>/dev/null; then
echo -e "${RED}Error: Python 3.9 or higher is required${NC}"
exit 1
fi
echo -e "${GREEN}✓ Python version OK${NC}"
echo ""
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
echo -e "${GREEN}✓ Virtual environment created${NC}"
else
echo -e "${YELLOW}Virtual environment already exists${NC}"
fi
echo ""
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
echo -e "${GREEN}✓ Virtual environment activated${NC}"
echo ""
# Install dependencies
echo "Installing dependencies..."
pip install -q --upgrade pip
pip install -q -r requirements.txt
echo -e "${GREEN}✓ Dependencies installed${NC}"
echo ""
# Check if .env exists
if [ ! -f ".env" ]; then
echo "Creating .env file from template..."
cp .env.example .env
echo -e "${YELLOW}⚠ Please edit .env and add your GEMINI_API_KEY${NC}"
echo ""
echo "Get your API key from: https://makersuite.google.com/app/apikey"
echo ""
read -p "Press Enter to open .env for editing (or Ctrl+C to exit)..."
${EDITOR:-nano} .env
else
echo -e "${YELLOW}.env file already exists${NC}"
fi
echo ""
# Verify installation
echo "Verifying installation..."
python verify_installation.py
if [ $? -eq 0 ]; then
echo ""
echo -e "${GREEN}=================================================="
echo " Setup Complete! ✓"
echo "==================================================${NC}"
echo ""
echo "Next steps:"
echo ""
echo "1. Try the basic example:"
echo " python examples/basic_usage.py"
echo ""
echo "2. Try the ACE evolution demo:"
echo " python examples/ace_evolution_demo.py"
echo ""
echo "3. Read the documentation:"
echo " cat README.md"
echo ""
echo "4. Start building your own RAG application!"
echo ""
else
echo ""
echo -e "${RED}Setup verification failed. Please check the errors above.${NC}"
exit 1
fi