Spaces:
Sleeping
Sleeping
| """ | |
| Configuration settings for the Memory Chat application. | |
| """ | |
| # Model configuration | |
| DEFAULT_MODEL = "microsoft/DialoGPT-medium" | |
| ALTERNATIVE_MODELS = [ | |
| "microsoft/DialoGPT-small", | |
| "microsoft/DialoGPT-large", | |
| "facebook/blenderbot-400M-distill", | |
| ] | |
| # Memory configuration | |
| MEMORY_DIR = "memories" | |
| EMBEDDING_MODEL = "all-MiniLM-L6-v2" | |
| MAX_RETRIEVED_MEMORIES = 5 | |
| MEMORY_IMPORTANCE_THRESHOLD = 0.7 | |
| # Chat configuration | |
| MAX_RESPONSE_LENGTH = 1000 | |
| TEMPERATURE = 0.7 | |
| TOP_P = 0.9 | |
| REPETITION_PENALTY = 1.2 | |
| # UI configuration | |
| GRADIO_TITLE = "Memory Chat with Hugging Face" | |
| GRADIO_THEME = "soft" | |
| # Keywords that trigger memory recording | |
| MEMORY_TRIGGER_KEYWORDS = [ | |
| "remember", "note", "save", "important", "fact", "detail", | |
| "my name is", "i live in", "i work at", "i study", | |
| "my birthday", "my favorite", "i love", "i hate", "i like", | |
| "never", "always", "often", "every", "daily", "weekly" | |
| ] | |
| # Memory types | |
| MEMORY_TYPES = { | |
| "general": "General information and facts", | |
| "conversation": "Important details from chats", | |
| "preference": "Likes, dislikes, favorites", | |
| "important": "Critical information marked as important", | |
| "personal": "Personal information and details" | |
| } |