|
@@ -92,34 +92,23 @@ def get_dialogue_history():
|
|
|
|
|
|
@app.route('/api/listModels', methods=['GET'])
|
|
@app.route('/api/listModels', methods=['GET'])
|
|
def list_models():
|
|
def list_models():
|
|
- models = [
|
|
|
|
- {
|
|
|
|
- 'model_type': 'openai_compatible',
|
|
|
|
- 'model_name': chat_service.VOLCENGINE_MODEL_DEEPSEEK_V3,
|
|
|
|
- 'display_name': 'DeepSeek V3 on 火山'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'model_type': 'openai_compatible',
|
|
|
|
- 'model_name': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_32K,
|
|
|
|
- 'display_name': '豆包Pro 32K'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'model_type': 'openai_compatible',
|
|
|
|
- 'model_name': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_1_5,
|
|
|
|
- 'display_name': '豆包Pro 1.5'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'model_type': 'openai_compatible',
|
|
|
|
- 'model_name': chat_service.VOLCENGINE_BOT_DEEPSEEK_V3_SEARCH,
|
|
|
|
- 'display_name': 'DeepSeek V3联网 on 火山'
|
|
|
|
- },
|
|
|
|
|
|
+ models = {
|
|
|
|
+ "deepseek-chat": chat_service.VOLCENGINE_MODEL_DEEPSEEK_V3,
|
|
|
|
+ "gpt-4o": chat_service.OPENAI_MODEL_GPT_4o,
|
|
|
|
+ "gpt-4o-mini": chat_service.OPENAI_MODEL_GPT_4o_mini,
|
|
|
|
+ "doubao-pro-32k": chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_32K,
|
|
|
|
+ "doubao-pro-1.5": chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_1_5_32K,
|
|
|
|
+ "doubao-1.5-vision-pro": chat_service.VOLCENGINE_MODEL_DOUBAO_1_5_VISION_PRO,
|
|
|
|
+ }
|
|
|
|
+ ret_data = [
|
|
{
|
|
{
|
|
'model_type': 'openai_compatible',
|
|
'model_type': 'openai_compatible',
|
|
- 'model_name': chat_service.VOLCENGINE_MODEL_DOUBAO_1_5_VISION_PRO,
|
|
|
|
- 'display_name': '豆包1.5视觉理解Pro'
|
|
|
|
- },
|
|
|
|
|
|
+ 'model_name': model_name,
|
|
|
|
+ 'display_name': model_display_name
|
|
|
|
+ }
|
|
|
|
+ for model_display_name, model_name in models.items()
|
|
]
|
|
]
|
|
- return wrap_response(200, data=models)
|
|
|
|
|
|
+ return wrap_response(200, data=ret_data)
|
|
|
|
|
|
|
|
|
|
@app.route('/api/listScenes', methods=['GET'])
|
|
@app.route('/api/listScenes', methods=['GET'])
|
|
@@ -147,8 +136,8 @@ def get_base_prompt():
|
|
model_map = {
|
|
model_map = {
|
|
'greeting': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_32K,
|
|
'greeting': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_32K,
|
|
'chitchat': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_32K,
|
|
'chitchat': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_32K,
|
|
- 'profile_extractor': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_1_5,
|
|
|
|
- 'response_type_detector': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_1_5,
|
|
|
|
|
|
+ 'profile_extractor': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_1_5_32K,
|
|
|
|
+ 'response_type_detector': chat_service.VOLCENGINE_MODEL_DOUBAO_PRO_1_5_32K,
|
|
'custom_debugging': chat_service.VOLCENGINE_BOT_DEEPSEEK_V3_SEARCH
|
|
'custom_debugging': chat_service.VOLCENGINE_BOT_DEEPSEEK_V3_SEARCH
|
|
}
|
|
}
|
|
if scene not in prompt_map:
|
|
if scene not in prompt_map:
|