Spaces:
Sleeping
Sleeping
import os | |
from dataclasses import dataclass | |
import pytz | |
class Config: | |
# Version | |
VERSION = "1.0.0" | |
# the newest OpenAI model is "gpt-4o" which was released May 13, 2024. | |
OPENAI_MODEL = "gpt-4o-mini-2024-07-18" # Changed from "gpt-4o-mini-2024-07-18" to "gpt-4o" "o1-mini-2024-09-12" | |
GEMINI_MODEL = "google/gemini-2.0-flash-exp:free" | |
AUTO_MODEL = "openrouter/auto" | |
# CLAUDE_MODEL = "anthropic/claude-3-sonnet:free" | |
CLAUDE_MODEL = "anthropic/claude-3.5-sonnet" | |
OPENROUTER_API_BASE = "https://openrouter.ai/api/v1" | |
SUPPORTED_LANGUAGES = ["en", "ja"] | |
DEFAULT_LANGUAGE = "ja" # Changed from "en" to "ja" | |
# Timezone settings | |
DEFAULT_TIMEZONE = "Asia/Tokyo" | |
SUPPORTED_TIMEZONES = [ | |
"Asia/Tokyo", | |
"America/New_York", | |
"America/Los_Angeles", | |
"Europe/London", | |
"Europe/Paris", | |
"Asia/Shanghai", | |
"Asia/Singapore", | |
"Australia/Sydney", | |
"Pacific/Auckland" | |
] | |
# DeepSeek model configuration | |
DEEPSEEK_MODEL = "deepseek-chat" | |
DEEPSEEK_API_BASE = "https://api.deepseek.com/v1/chat/completions" | |
# Chat context settings | |
MAX_HISTORY_CHATS = 10 | |
MAX_CONTEXT_LENGTH = 4096 # Maximum token length for context | |
MEMORY_SUMMARY_TOKENS = 150 # Length of conversation summaries | |
CONTEXT_WINDOW_MESSAGES = 10 # Number of messages to keep in immediate context | |
def get_deepseek_key(): | |
return os.getenv("DEEPSEEK_API_KEY", "") | |
def get_openai_key(): | |
return os.getenv("OPENAI_API_KEY", "") | |
def get_openrouter_key(): | |
return os.getenv("OPENROUTER_API_KEY", "") | |