Initial commit of Marketing Assistant AI project, including backend setup with FastAPI, brand style management, and marketing copy generation features. Added .gitignore, README, and various data files for brand voice, past campaigns, and book excerpts. Implemented vector store for content retrieval and embeddings using Cohere API. Included HTML template for user interface.

This commit is contained in:
boladeE
2025-04-17 22:24:53 +01:00
commit e80ba5c0d7
18 changed files with 840 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
from dataclasses import dataclass
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
@dataclass
class Settings:
# API Keys
COHERE_API_KEY: str
DEEPSEEK_API_KEY: str
# Vector Store Settings
VECTOR_DIMENSION: int = 1024 # Cohere's embed-english-v3.0 model dimension
INDEX_PATH: str = "data/vector_store/index.faiss"
# Content Settings
MAX_CONTEXT_LENGTH: int = 2000
DEFAULT_MODEL: str = "deepseek-chat"
# Brand Settings
BRAND_TONE: str = "professional and empathetic"
BRAND_VOICE: str = "Adriana James"
@classmethod
def from_env(cls):
"""Create a Settings instance from environment variables."""
return cls(
COHERE_API_KEY=os.getenv("COHERE_API_KEY", ""),
DEEPSEEK_API_KEY=os.getenv("DEEPSEEK_API_KEY", ""),
VECTOR_DIMENSION=int(os.getenv("VECTOR_DIMENSION", "1024")),
INDEX_PATH=os.getenv("INDEX_PATH", "data/vector_store/index.faiss"),
MAX_CONTEXT_LENGTH=int(os.getenv("MAX_CONTEXT_LENGTH", "2000")),
DEFAULT_MODEL=os.getenv("DEFAULT_MODEL", "deepseek-chat"),
BRAND_TONE=os.getenv("BRAND_TONE", "professional and empathetic"),
BRAND_VOICE=os.getenv("BRAND_VOICE", "Adriana James")
)
# Create a global settings instance
settings = Settings.from_env()