feat: Initial implementation of Marketing Assistant AI for Adriana James
- Set up FastAPI backend with modular structure: - main.py for API routing - copywriter.py for AI-powered content generation using Cohere - embeddings.py for generating and reranking content embeddings - vector_store.py for FAISS-based similarity search - brand_style.py for managing brand tone, taboo words, and preferred terms - config.py for managing environment and application settings - Configured RESTful API endpoints: /generate-copy, /brand-style, /training-data, /improve-content, /analyze-content - Created frontend with vanilla HTML, CSS, and JS (index.html, styles.css, app.js) - Integrated brand style management for tone, voice, taboo words, and terminology - Implemented vector search for referencing similar historical content - Enabled training data input to improve future AI output - Added environment variable support for API keys and model configs - Structured data storage with local JSON and DB files - Added developer documentation, API reference, and project setup instructions This commit provides the foundation for a full-stack, AI-driven content creation platform that ensures brand consistency, speeds up marketing workflows, and supports iterative improvement over time.
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
"""
|
||||
Configuration module for the Marketing Assistant AI.
|
||||
Handles environment variables and application settings.
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
|
||||
# Base paths
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
DATA_DIR = BASE_DIR / "data"
|
||||
|
||||
# Ensure data directories exist
|
||||
(DATA_DIR / "past_campaigns").mkdir(exist_ok=True)
|
||||
(DATA_DIR / "user_queries").mkdir(exist_ok=True)
|
||||
(DATA_DIR / "style_guidelines").mkdir(exist_ok=True)
|
||||
|
||||
# API configuration
|
||||
API_HOST = os.getenv("API_HOST", "localhost")
|
||||
API_PORT = int(os.getenv("API_PORT", 8000))
|
||||
|
||||
# LLM configuration
|
||||
LLM_MODEL = os.getenv("LLM_MODEL")
|
||||
LLM_API_KEY = os.getenv("LLM_API_KEY")
|
||||
|
||||
# Cohere configuration
|
||||
COHERE_API_KEY = os.getenv("COHERE_API_KEY")
|
||||
|
||||
# Vector database configuration
|
||||
VECTOR_DB_PATH = os.getenv("VECTOR_DB_PATH", str(DATA_DIR / "vector_store"))
|
||||
|
||||
# Brand configuration
|
||||
BRAND_NAME = os.getenv("BRAND_NAME", "Adriana James")
|
||||
|
||||
# Content types
|
||||
CONTENT_TYPES = [
|
||||
"email_campaign",
|
||||
"social_media",
|
||||
"blog_post",
|
||||
"website_copy",
|
||||
"ad_copy",
|
||||
"funnel_page",
|
||||
"product_description",
|
||||
"press_release"
|
||||
]
|
||||
|
||||
# Tone options
|
||||
TONE_OPTIONS = [
|
||||
"professional",
|
||||
"friendly",
|
||||
"excited",
|
||||
"authoritative",
|
||||
"casual",
|
||||
"inspirational",
|
||||
"empathetic",
|
||||
"humorous"
|
||||
]
|
||||
|
||||
# Content length options
|
||||
LENGTH_OPTIONS = [
|
||||
"short", # < 100 words
|
||||
"medium", # 100-300 words
|
||||
"long", # > 300 words
|
||||
]
|
||||
|
||||
# Default brand style guidelines
|
||||
DEFAULT_BRAND_STYLE = {
|
||||
"brand_name": BRAND_NAME,
|
||||
"tone": ["professional", "friendly", "inspirational"],
|
||||
"voice_characteristics": ["clear", "direct", "empowering"],
|
||||
"taboo_words": ["cheap", "discount", "bargain"],
|
||||
"preferred_terms": {
|
||||
"customers": "clients",
|
||||
"products": "solutions"
|
||||
}
|
||||
}
|
||||
|
||||
# Logging configuration
|
||||
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
|
||||
LOG_FILE = os.getenv("LOG_FILE", str(BASE_DIR / "logs" / "app.log"))
|
||||
|
||||
# Create logs directory if it doesn't exist
|
||||
(BASE_DIR / "logs").mkdir(exist_ok=True)
|
||||
Reference in New Issue
Block a user