refactor for HF public repo
Browse files- .env.example +25 -6
- .env.test +15 -0
- .gitignore +19 -2
- agent_system/user_store.py +6 -6
- config.py +4 -4
- data/users/profiles/admin@example.com.json +2 -2
- data/users/profiles/joker@example.com.json +2 -2
- data/users/profiles/poet@example.com.json +2 -2
.env.example
CHANGED
|
@@ -1,8 +1,27 @@
|
|
| 1 |
-
# OpenAI
|
| 2 |
-
OPENAI_API_KEY=
|
| 3 |
-
|
| 4 |
-
# Model Configuration
|
| 5 |
OPENAI_MODEL=gpt-4o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
|
|
|
|
|
| 1 |
+
# OpenAI Configuration (Required)
|
| 2 |
+
OPENAI_API_KEY=sk-your-openai-api-key-here
|
|
|
|
|
|
|
| 3 |
OPENAI_MODEL=gpt-4o
|
| 4 |
+
OPENAI_SEARCH_MODEL=gpt-4o
|
| 5 |
+
|
| 6 |
+
# HeyGen Configuration (Optional - for video features)
|
| 7 |
+
HEYGEN_API_KEY=your-heygen-api-key-here
|
| 8 |
+
HEYGEN_API_BASE_URL=https://api.heygen.com
|
| 9 |
+
HEYGEN_AVATAR_ID=your-avatar-id-here
|
| 10 |
+
HEYGEN_VOICE_ID=your-voice-id-here
|
| 11 |
+
|
| 12 |
+
# Agent Configuration
|
| 13 |
+
AGENT_TEMPERATURE=0.7
|
| 14 |
+
ENVIRONMENT=production
|
| 15 |
+
|
| 16 |
+
# Optional Features
|
| 17 |
+
ENABLE_TRACING=false
|
| 18 |
+
SCRIPT_VECTORS_ID=your-script-vectors-id-here
|
| 19 |
+
TEMPLATES_VECTORS_ID=your-templates-vectors-id-here
|
| 20 |
+
|
| 21 |
+
# Logging Configuration
|
| 22 |
+
LOG_LEVEL=INFO
|
| 23 |
+
LOG_TO_FILE=true
|
| 24 |
|
| 25 |
+
# Gradio Configuration (Optional)
|
| 26 |
+
GRADIO_USERNAME=admin
|
| 27 |
+
GRADIO_PASSWORD=your-password-here
|
.env.test
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Test Environment - Local Testing Only
|
| 2 |
+
OPENAI_API_KEY=your-test-openai-key-here
|
| 3 |
+
OPENAI_MODEL=gpt-4o
|
| 4 |
+
OPENAI_SEARCH_MODEL=gpt-4o
|
| 5 |
+
|
| 6 |
+
# Optional HeyGen (leave empty to test without video features)
|
| 7 |
+
HEYGEN_API_KEY=
|
| 8 |
+
HEYGEN_AVATAR_ID=
|
| 9 |
+
HEYGEN_VOICE_ID=
|
| 10 |
+
|
| 11 |
+
# Local settings
|
| 12 |
+
ENVIRONMENT=development
|
| 13 |
+
AGENT_TEMPERATURE=0.7
|
| 14 |
+
LOG_LEVEL=DEBUG
|
| 15 |
+
ENABLE_TRACING=false
|
.gitignore
CHANGED
|
@@ -5,6 +5,12 @@ new-env/
|
|
| 5 |
dotenv/
|
| 6 |
env/
|
| 7 |
.env
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
.venv/
|
| 9 |
|
| 10 |
# Python cache files
|
|
@@ -57,5 +63,16 @@ Thumbs.db
|
|
| 57 |
0.27.0
|
| 58 |
2.0.0
|
| 59 |
|
| 60 |
-
# User data
|
| 61 |
-
data/users/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
dotenv/
|
| 6 |
env/
|
| 7 |
.env
|
| 8 |
+
.env.local
|
| 9 |
+
.env.production
|
| 10 |
+
.env.staging
|
| 11 |
+
.env.development
|
| 12 |
+
*.env
|
| 13 |
+
!.env.example
|
| 14 |
.venv/
|
| 15 |
|
| 16 |
# Python cache files
|
|
|
|
| 63 |
0.27.0
|
| 64 |
2.0.0
|
| 65 |
|
| 66 |
+
# User data and logs
|
| 67 |
+
data/users/history/
|
| 68 |
+
data/users/profiles/*.json
|
| 69 |
+
!data/users/profiles/joker@example.com.json
|
| 70 |
+
!data/users/profiles/poet@example.com.json
|
| 71 |
+
!data/users/profiles/admin@example.com.json
|
| 72 |
+
# Note: joe@example.com.json will be created to replace old profile
|
| 73 |
+
|
| 74 |
+
# Security - additional patterns
|
| 75 |
+
secrets/
|
| 76 |
+
private/
|
| 77 |
+
*.key
|
| 78 |
+
*.pem
|
agent_system/user_store.py
CHANGED
|
@@ -11,7 +11,7 @@ USER_EMAILS = {
|
|
| 11 |
"joker@example.com": True,
|
| 12 |
"poet@example.com": True,
|
| 13 |
"admin@example.com": True,
|
| 14 |
-
"joe@
|
| 15 |
}
|
| 16 |
|
| 17 |
# User profiles store
|
|
@@ -34,11 +34,11 @@ USER_PROFILES = {
|
|
| 34 |
"bio": "System administrator",
|
| 35 |
"history": ["Previously asked about system settings"]
|
| 36 |
},
|
| 37 |
-
"joe@
|
| 38 |
-
"name": "
|
| 39 |
-
"phone": "
|
| 40 |
-
"bio": "
|
| 41 |
-
"history": []
|
| 42 |
}
|
| 43 |
}
|
| 44 |
|
|
|
|
| 11 |
"joker@example.com": True,
|
| 12 |
"poet@example.com": True,
|
| 13 |
"admin@example.com": True,
|
| 14 |
+
"joe@example.com": True,
|
| 15 |
}
|
| 16 |
|
| 17 |
# User profiles store
|
|
|
|
| 34 |
"bio": "System administrator",
|
| 35 |
"history": ["Previously asked about system settings"]
|
| 36 |
},
|
| 37 |
+
"joe@example.com": {
|
| 38 |
+
"name": "Joe Demo",
|
| 39 |
+
"phone": "555-0123",
|
| 40 |
+
"bio": "Demo user for testing various agent features",
|
| 41 |
+
"history": ["Previously tested video generation and web search"]
|
| 42 |
}
|
| 43 |
}
|
| 44 |
|
config.py
CHANGED
|
@@ -18,8 +18,8 @@ AGENT_TEMPERATURE = 0.7
|
|
| 18 |
# Application environment
|
| 19 |
ENVIRONMENT = os.getenv("ENVIRONMENT", "development")
|
| 20 |
|
| 21 |
-
# HeyGen API configuration
|
| 22 |
-
HEYGEN_API_KEY = os.getenv("HEYGEN_API_KEY"
|
| 23 |
HEYGEN_API_BASE_URL = os.getenv("HEYGEN_API_BASE_URL", "https://api.heygen.com")
|
| 24 |
-
HEYGEN_AVATAR_ID = os.getenv("HEYGEN_AVATAR_ID"
|
| 25 |
-
HEYGEN_VOICE_ID = os.getenv("HEYGEN_VOICE_ID"
|
|
|
|
| 18 |
# Application environment
|
| 19 |
ENVIRONMENT = os.getenv("ENVIRONMENT", "development")
|
| 20 |
|
| 21 |
+
# HeyGen API configuration - Environment variables only, no fallbacks
|
| 22 |
+
HEYGEN_API_KEY = os.getenv("HEYGEN_API_KEY")
|
| 23 |
HEYGEN_API_BASE_URL = os.getenv("HEYGEN_API_BASE_URL", "https://api.heygen.com")
|
| 24 |
+
HEYGEN_AVATAR_ID = os.getenv("HEYGEN_AVATAR_ID")
|
| 25 |
+
HEYGEN_VOICE_ID = os.getenv("HEYGEN_VOICE_ID")
|
data/users/profiles/admin@example.com.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
| 7 |
"notifications": true
|
| 8 |
},
|
| 9 |
"history_files": {
|
| 10 |
-
"posts": "
|
| 11 |
-
"videos": "
|
| 12 |
},
|
| 13 |
"metadata": {
|
| 14 |
"created_at": 1672531200,
|
|
|
|
| 7 |
"notifications": true
|
| 8 |
},
|
| 9 |
"history_files": {
|
| 10 |
+
"posts": "data/users/history/admin@example.com/posts.json",
|
| 11 |
+
"videos": "data/users/history/admin@example.com/videos.json"
|
| 12 |
},
|
| 13 |
"metadata": {
|
| 14 |
"created_at": 1672531200,
|
data/users/profiles/joker@example.com.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
| 7 |
"notifications": true
|
| 8 |
},
|
| 9 |
"history_files": {
|
| 10 |
-
"posts": "
|
| 11 |
-
"videos": "
|
| 12 |
},
|
| 13 |
"metadata": {
|
| 14 |
"created_at": 1683024000,
|
|
|
|
| 7 |
"notifications": true
|
| 8 |
},
|
| 9 |
"history_files": {
|
| 10 |
+
"posts": "data/users/history/joker@example.com/posts.json",
|
| 11 |
+
"videos": "data/users/history/joker@example.com/videos.json"
|
| 12 |
},
|
| 13 |
"metadata": {
|
| 14 |
"created_at": 1683024000,
|
data/users/profiles/poet@example.com.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
| 7 |
"notifications": false
|
| 8 |
},
|
| 9 |
"history_files": {
|
| 10 |
-
"posts": "
|
| 11 |
-
"videos": "
|
| 12 |
},
|
| 13 |
"metadata": {
|
| 14 |
"created_at": 1688169600,
|
|
|
|
| 7 |
"notifications": false
|
| 8 |
},
|
| 9 |
"history_files": {
|
| 10 |
+
"posts": "data/users/history/poet@example.com/posts.json",
|
| 11 |
+
"videos": "data/users/history/poet@example.com/videos.json"
|
| 12 |
},
|
| 13 |
"metadata": {
|
| 14 |
"created_at": 1688169600,
|