Spaces:
Sleeping
Sleeping
Add DeepSeek-V3
Browse files
config.py
CHANGED
@@ -30,16 +30,24 @@ class Config:
|
|
30 |
"Pacific/Auckland"
|
31 |
]
|
32 |
|
|
|
|
|
|
|
|
|
33 |
# Chat context settings
|
34 |
MAX_HISTORY_CHATS = 10
|
35 |
MAX_CONTEXT_LENGTH = 4096 # Maximum token length for context
|
36 |
MEMORY_SUMMARY_TOKENS = 150 # Length of conversation summaries
|
37 |
CONTEXT_WINDOW_MESSAGES = 10 # Number of messages to keep in immediate context
|
38 |
|
|
|
|
|
|
|
|
|
39 |
@staticmethod
|
40 |
def get_openai_key():
|
41 |
return os.getenv("OPENAI_API_KEY", "")
|
42 |
|
43 |
@staticmethod
|
44 |
def get_openrouter_key():
|
45 |
-
return os.getenv("OPENROUTER_API_KEY", "")
|
|
|
30 |
"Pacific/Auckland"
|
31 |
]
|
32 |
|
33 |
+
# DeepSeek model configuration
|
34 |
+
DEEPSEEK_MODEL = "deepseek-chat"
|
35 |
+
DEEPSEEK_API_BASE = "https://api.deepseek.com/v1"
|
36 |
+
|
37 |
# Chat context settings
|
38 |
MAX_HISTORY_CHATS = 10
|
39 |
MAX_CONTEXT_LENGTH = 4096 # Maximum token length for context
|
40 |
MEMORY_SUMMARY_TOKENS = 150 # Length of conversation summaries
|
41 |
CONTEXT_WINDOW_MESSAGES = 10 # Number of messages to keep in immediate context
|
42 |
|
43 |
+
@staticmethod
|
44 |
+
def get_deepseek_key():
|
45 |
+
return os.getenv("DEEPSEEK_API_KEY", "")
|
46 |
+
|
47 |
@staticmethod
|
48 |
def get_openai_key():
|
49 |
return os.getenv("OPENAI_API_KEY", "")
|
50 |
|
51 |
@staticmethod
|
52 |
def get_openrouter_key():
|
53 |
+
return os.getenv("OPENROUTER_API_KEY", "")
|