File size: 1,696 Bytes
aa04092
 
 
 
 
 
 
46e66e9
 
 
aa04092
affdd0b
aa04092
5ae814c
aa04092
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a885379
46e66e9
 
a885379
aa04092
 
 
 
 
 
a885379
 
 
 
aa04092
 
 
 
 
 
a885379
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import os
from dataclasses import dataclass
import pytz


@dataclass
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

    @staticmethod
    def get_deepseek_key():
        return os.getenv("DEEPSEEK_API_KEY", "")

    @staticmethod
    def get_openai_key():
        return os.getenv("OPENAI_API_KEY", "")

    @staticmethod
    def get_openrouter_key():
        return os.getenv("OPENROUTER_API_KEY", "")