Use openai compatible as vendor
This commit is contained in:
@@ -16,16 +16,22 @@ from ..schemas import (
|
||||
|
||||
router = APIRouter(prefix="/asr", tags=["ASR Models"])
|
||||
|
||||
SILICONFLOW_DEFAULT_ASR_MODEL = "FunAudioLLM/SenseVoiceSmall"
|
||||
OPENAI_COMPATIBLE_DEFAULT_ASR_MODEL = "FunAudioLLM/SenseVoiceSmall"
|
||||
|
||||
|
||||
def _is_siliconflow_vendor(vendor: str) -> bool:
|
||||
return (vendor or "").strip().lower() in {"siliconflow", "硅基流动"}
|
||||
def _is_openai_compatible_vendor(vendor: str) -> bool:
|
||||
normalized = (vendor or "").strip().lower()
|
||||
return normalized in {
|
||||
"openai compatible",
|
||||
"openai-compatible",
|
||||
"siliconflow", # backward compatibility
|
||||
"硅基流动", # backward compatibility
|
||||
}
|
||||
|
||||
|
||||
def _default_asr_model(vendor: str) -> str:
|
||||
if _is_siliconflow_vendor(vendor):
|
||||
return SILICONFLOW_DEFAULT_ASR_MODEL
|
||||
if _is_openai_compatible_vendor(vendor):
|
||||
return OPENAI_COMPATIBLE_DEFAULT_ASR_MODEL
|
||||
return "whisper-1"
|
||||
|
||||
|
||||
@@ -129,7 +135,7 @@ def test_asr_model(
|
||||
# 连接性测试优先,避免依赖真实音频输入
|
||||
headers = {"Authorization": f"Bearer {model.api_key}"}
|
||||
with httpx.Client(timeout=60.0) as client:
|
||||
if model.vendor.lower() in ["siliconflow", "paraformer"]:
|
||||
if _is_openai_compatible_vendor(model.vendor) or model.vendor.lower() == "paraformer":
|
||||
response = client.get(f"{model.base_url}/asr", headers=headers)
|
||||
elif model.vendor.lower() == "openai":
|
||||
response = client.get(f"{model.base_url}/audio/models", headers=headers)
|
||||
@@ -258,7 +264,7 @@ async def preview_asr_model(
|
||||
raise HTTPException(status_code=400, detail="Uploaded audio file is empty")
|
||||
|
||||
effective_api_key = (api_key or "").strip() or (model.api_key or "").strip()
|
||||
if not effective_api_key and _is_siliconflow_vendor(model.vendor):
|
||||
if not effective_api_key and _is_openai_compatible_vendor(model.vendor):
|
||||
effective_api_key = os.getenv("SILICONFLOW_API_KEY", "").strip()
|
||||
if not effective_api_key:
|
||||
raise HTTPException(status_code=400, detail=f"API key is required for ASR model: {model.name}")
|
||||
|
||||
@@ -13,8 +13,13 @@ from ..schemas import (
|
||||
router = APIRouter(prefix="/assistants", tags=["Assistants"])
|
||||
|
||||
|
||||
def _is_siliconflow_vendor(vendor: Optional[str]) -> bool:
|
||||
return (vendor or "").strip().lower() in {"siliconflow", "硅基流动"}
|
||||
def _is_openai_compatible_vendor(vendor: Optional[str]) -> bool:
|
||||
return (vendor or "").strip().lower() in {
|
||||
"siliconflow",
|
||||
"硅基流动",
|
||||
"openai compatible",
|
||||
"openai-compatible",
|
||||
}
|
||||
|
||||
|
||||
def _resolve_runtime_metadata(db: Session, assistant: Assistant) -> dict:
|
||||
@@ -47,11 +52,11 @@ def _resolve_runtime_metadata(db: Session, assistant: Assistant) -> dict:
|
||||
if assistant.asr_model_id:
|
||||
asr = db.query(ASRModel).filter(ASRModel.id == assistant.asr_model_id).first()
|
||||
if asr:
|
||||
asr_provider = "siliconflow" if _is_siliconflow_vendor(asr.vendor) else "buffered"
|
||||
asr_provider = "openai_compatible" if _is_openai_compatible_vendor(asr.vendor) else "buffered"
|
||||
metadata["services"]["asr"] = {
|
||||
"provider": asr_provider,
|
||||
"model": asr.model_name or asr.name,
|
||||
"apiKey": asr.api_key if asr_provider == "siliconflow" else None,
|
||||
"apiKey": asr.api_key if asr_provider == "openai_compatible" else None,
|
||||
}
|
||||
else:
|
||||
warnings.append(f"ASR model not found: {assistant.asr_model_id}")
|
||||
@@ -61,12 +66,12 @@ def _resolve_runtime_metadata(db: Session, assistant: Assistant) -> dict:
|
||||
elif assistant.voice:
|
||||
voice = db.query(Voice).filter(Voice.id == assistant.voice).first()
|
||||
if voice:
|
||||
tts_provider = "siliconflow" if _is_siliconflow_vendor(voice.vendor) else "edge"
|
||||
tts_provider = "openai_compatible" if _is_openai_compatible_vendor(voice.vendor) else "edge"
|
||||
metadata["services"]["tts"] = {
|
||||
"enabled": True,
|
||||
"provider": tts_provider,
|
||||
"model": voice.model,
|
||||
"apiKey": voice.api_key if tts_provider == "siliconflow" else None,
|
||||
"apiKey": voice.api_key if tts_provider == "openai_compatible" else None,
|
||||
"voice": voice.voice_key or voice.id,
|
||||
"speed": assistant.speed or voice.speed,
|
||||
}
|
||||
|
||||
@@ -467,7 +467,13 @@ def _test_asr_model(db: Session, model_id: str, result: AutotestResult):
|
||||
headers = {"Authorization": f"Bearer {model.api_key}"}
|
||||
|
||||
with httpx.Client(timeout=30.0) as client:
|
||||
if model.vendor.lower() in ["siliconflow", "paraformer"]:
|
||||
normalized_vendor = (model.vendor or "").strip().lower()
|
||||
if normalized_vendor in [
|
||||
"openai compatible",
|
||||
"openai-compatible",
|
||||
"siliconflow", # backward compatibility
|
||||
"paraformer",
|
||||
]:
|
||||
response = client.get(
|
||||
f"{model.base_url}/asr",
|
||||
headers=headers
|
||||
|
||||
@@ -13,20 +13,26 @@ from ..schemas import VoiceCreate, VoiceOut, VoicePreviewRequest, VoicePreviewRe
|
||||
|
||||
router = APIRouter(prefix="/voices", tags=["Voices"])
|
||||
|
||||
SILICONFLOW_DEFAULT_MODEL = "FunAudioLLM/CosyVoice2-0.5B"
|
||||
OPENAI_COMPATIBLE_DEFAULT_MODEL = "FunAudioLLM/CosyVoice2-0.5B"
|
||||
|
||||
|
||||
def _is_siliconflow_vendor(vendor: str) -> bool:
|
||||
return vendor.strip().lower() in {"siliconflow", "硅基流动"}
|
||||
def _is_openai_compatible_vendor(vendor: str) -> bool:
|
||||
normalized = (vendor or "").strip().lower()
|
||||
return normalized in {
|
||||
"openai compatible",
|
||||
"openai-compatible",
|
||||
"siliconflow", # backward compatibility
|
||||
"硅基流动", # backward compatibility
|
||||
}
|
||||
|
||||
|
||||
def _default_base_url(vendor: str) -> Optional[str]:
|
||||
if _is_siliconflow_vendor(vendor):
|
||||
if _is_openai_compatible_vendor(vendor):
|
||||
return "https://api.siliconflow.cn/v1"
|
||||
return None
|
||||
|
||||
|
||||
def _build_siliconflow_voice_key(voice: Voice, model: str) -> str:
|
||||
def _build_openai_compatible_voice_key(voice: Voice, model: str) -> str:
|
||||
if voice.voice_key:
|
||||
return voice.voice_key
|
||||
if ":" in voice.id:
|
||||
@@ -65,8 +71,8 @@ def create_voice(data: VoiceCreate, db: Session = Depends(get_db)):
|
||||
model = data.model
|
||||
voice_key = data.voice_key
|
||||
|
||||
if _is_siliconflow_vendor(vendor):
|
||||
model = model or SILICONFLOW_DEFAULT_MODEL
|
||||
if _is_openai_compatible_vendor(vendor):
|
||||
model = model or OPENAI_COMPATIBLE_DEFAULT_MODEL
|
||||
if not voice_key:
|
||||
raw_id = (data.id or data.name).strip()
|
||||
voice_key = raw_id if ":" in raw_id else f"{model}:{raw_id}"
|
||||
@@ -115,11 +121,11 @@ def update_voice(id: str, data: VoiceUpdate, db: Session = Depends(get_db)):
|
||||
update_data["vendor"] = update_data["vendor"].strip()
|
||||
|
||||
vendor_for_defaults = update_data.get("vendor", voice.vendor)
|
||||
if _is_siliconflow_vendor(vendor_for_defaults):
|
||||
model = update_data.get("model") or voice.model or SILICONFLOW_DEFAULT_MODEL
|
||||
if _is_openai_compatible_vendor(vendor_for_defaults):
|
||||
model = update_data.get("model") or voice.model or OPENAI_COMPATIBLE_DEFAULT_MODEL
|
||||
voice_key = update_data.get("voice_key") or voice.voice_key
|
||||
update_data["model"] = model
|
||||
update_data["voice_key"] = voice_key or _build_siliconflow_voice_key(voice, model)
|
||||
update_data["voice_key"] = voice_key or _build_openai_compatible_voice_key(voice, model)
|
||||
|
||||
for field, value in update_data.items():
|
||||
setattr(voice, field, value)
|
||||
@@ -152,7 +158,7 @@ def preview_voice(id: str, data: VoicePreviewRequest, db: Session = Depends(get_
|
||||
raise HTTPException(status_code=400, detail="Preview text cannot be empty")
|
||||
|
||||
api_key = (data.api_key or "").strip() or (voice.api_key or "").strip()
|
||||
if not api_key and _is_siliconflow_vendor(voice.vendor):
|
||||
if not api_key and _is_openai_compatible_vendor(voice.vendor):
|
||||
api_key = os.getenv("SILICONFLOW_API_KEY", "").strip()
|
||||
if not api_key:
|
||||
raise HTTPException(status_code=400, detail=f"API key is required for voice: {voice.name}")
|
||||
@@ -161,11 +167,11 @@ def preview_voice(id: str, data: VoicePreviewRequest, db: Session = Depends(get_
|
||||
if not base_url:
|
||||
raise HTTPException(status_code=400, detail=f"Base URL is required for voice: {voice.name}")
|
||||
|
||||
model = voice.model or SILICONFLOW_DEFAULT_MODEL
|
||||
model = voice.model or OPENAI_COMPATIBLE_DEFAULT_MODEL
|
||||
payload = {
|
||||
"model": model,
|
||||
"input": text,
|
||||
"voice": voice.voice_key or _build_siliconflow_voice_key(voice, model),
|
||||
"voice": voice.voice_key or _build_openai_compatible_voice_key(voice, model),
|
||||
"response_format": "mp3",
|
||||
"speed": data.speed if data.speed is not None else voice.speed,
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ interface ASRModel {
|
||||
id: string; // 模型唯一标识 (8位UUID)
|
||||
user_id: number; // 所属用户ID
|
||||
name: string; // 模型显示名称
|
||||
vendor: string; // 供应商: "OpenAI" | "SiliconFlow" | "Paraformer" | 等
|
||||
vendor: string; // 供应商: "OpenAI Compatible" | "Paraformer" | 等
|
||||
language: string; // 识别语言: "zh" | "en" | "Multi-lingual"
|
||||
base_url: string; // API Base URL
|
||||
api_key: string; // API Key
|
||||
@@ -64,7 +64,7 @@ GET /api/v1/asr
|
||||
"id": "abc12345",
|
||||
"user_id": 1,
|
||||
"name": "Whisper 多语种识别",
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"language": "Multi-lingual",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-***",
|
||||
@@ -78,7 +78,7 @@ GET /api/v1/asr
|
||||
"id": "def67890",
|
||||
"user_id": 1,
|
||||
"name": "SenseVoice 中文识别",
|
||||
"vendor": "SiliconFlow",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"language": "zh",
|
||||
"base_url": "https://api.siliconflow.cn/v1",
|
||||
"api_key": "sf-***",
|
||||
@@ -114,7 +114,7 @@ GET /api/v1/asr/{id}
|
||||
"id": "abc12345",
|
||||
"user_id": 1,
|
||||
"name": "Whisper 多语种识别",
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"language": "Multi-lingual",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-***",
|
||||
@@ -140,7 +140,7 @@ POST /api/v1/asr
|
||||
```json
|
||||
{
|
||||
"name": "SenseVoice 中文识别",
|
||||
"vendor": "SiliconFlow",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"language": "zh",
|
||||
"base_url": "https://api.siliconflow.cn/v1",
|
||||
"api_key": "sk-your-api-key",
|
||||
@@ -157,7 +157,7 @@ POST /api/v1/asr
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|------|------|------|------|
|
||||
| name | string | 是 | 模型显示名称 |
|
||||
| vendor | string | 是 | 供应商: "OpenAI" / "SiliconFlow" / "Paraformer" |
|
||||
| vendor | string | 是 | 供应商: "OpenAI Compatible" / "Paraformer" |
|
||||
| language | string | 是 | 语言: "zh" / "en" / "Multi-lingual" |
|
||||
| base_url | string | 是 | API Base URL |
|
||||
| api_key | string | 是 | API Key |
|
||||
@@ -347,7 +347,7 @@ class ASRTestResponse(BaseModel):
|
||||
|
||||
```json
|
||||
{
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-xxx",
|
||||
"model_name": "whisper-1",
|
||||
@@ -357,11 +357,11 @@ class ASRTestResponse(BaseModel):
|
||||
}
|
||||
```
|
||||
|
||||
### SiliconFlow Paraformer
|
||||
### OpenAI Compatible Paraformer
|
||||
|
||||
```json
|
||||
{
|
||||
"vendor": "SiliconFlow",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"base_url": "https://api.siliconflow.cn/v1",
|
||||
"api_key": "sf-xxx",
|
||||
"model_name": "paraformer-v2",
|
||||
@@ -393,7 +393,7 @@ class ASRTestResponse(BaseModel):
|
||||
| test_filter_asr_models_by_language | 按语言过滤测试 |
|
||||
| test_filter_asr_models_by_enabled | 按启用状态过滤测试 |
|
||||
| test_create_asr_model_with_hotwords | 热词配置测试 |
|
||||
| test_test_asr_model_siliconflow | SiliconFlow 供应商测试 |
|
||||
| test_test_asr_model_siliconflow | OpenAI Compatible 供应商测试 |
|
||||
| test_test_asr_model_openai | OpenAI 供应商测试 |
|
||||
| test_different_asr_languages | 多语言测试 |
|
||||
| test_different_asr_vendors | 多供应商测试 |
|
||||
|
||||
@@ -20,7 +20,7 @@ interface LLMModel {
|
||||
id: string; // 模型唯一标识 (8位UUID)
|
||||
user_id: number; // 所属用户ID
|
||||
name: string; // 模型显示名称
|
||||
vendor: string; // 供应商: "OpenAI" | "SiliconFlow" | "Dify" | "FastGPT" | 等
|
||||
vendor: string; // 供应商: "OpenAI Compatible" | "Dify" | "FastGPT" | 等
|
||||
type: string; // 类型: "text" | "embedding" | "rerank"
|
||||
base_url: string; // API Base URL
|
||||
api_key: string; // API Key
|
||||
@@ -64,7 +64,7 @@ GET /api/v1/llm
|
||||
"id": "abc12345",
|
||||
"user_id": 1,
|
||||
"name": "GPT-4o",
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"type": "text",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-***",
|
||||
@@ -79,7 +79,7 @@ GET /api/v1/llm
|
||||
"id": "def67890",
|
||||
"user_id": 1,
|
||||
"name": "Embedding-3-Small",
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"type": "embedding",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-***",
|
||||
@@ -111,7 +111,7 @@ GET /api/v1/llm/{id}
|
||||
"id": "abc12345",
|
||||
"user_id": 1,
|
||||
"name": "GPT-4o",
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"type": "text",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-***",
|
||||
@@ -137,7 +137,7 @@ POST /api/v1/llm
|
||||
```json
|
||||
{
|
||||
"name": "GPT-4o",
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"type": "text",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-your-api-key",
|
||||
@@ -314,11 +314,11 @@ class LLMModelTestResponse(BaseModel):
|
||||
|
||||
## 供应商配置示例
|
||||
|
||||
### OpenAI
|
||||
### OpenAI Compatible (OpenAI Endpoint)
|
||||
|
||||
```json
|
||||
{
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-xxx",
|
||||
"model_name": "gpt-4o",
|
||||
@@ -327,11 +327,11 @@ class LLMModelTestResponse(BaseModel):
|
||||
}
|
||||
```
|
||||
|
||||
### SiliconFlow
|
||||
### OpenAI Compatible
|
||||
|
||||
```json
|
||||
{
|
||||
"vendor": "SiliconFlow",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"base_url": "https://api.siliconflow.com/v1",
|
||||
"api_key": "sf-xxx",
|
||||
"model_name": "deepseek-v3",
|
||||
@@ -356,7 +356,7 @@ class LLMModelTestResponse(BaseModel):
|
||||
|
||||
```json
|
||||
{
|
||||
"vendor": "OpenAI",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"api_key": "sk-xxx",
|
||||
"model_name": "text-embedding-3-small",
|
||||
|
||||
@@ -20,7 +20,7 @@ interface LLMModel {
|
||||
id: string; // 模型唯一标识
|
||||
user_id: number; // 所属用户ID
|
||||
name: string; // 模型显示名称
|
||||
vendor: string; // 供应商: "OpenAI Compatible" | "SiliconFlow" | "Dify" | "FastGPT"
|
||||
vendor: string; // 供应商: "OpenAI Compatible" | "Dify" | "FastGPT"
|
||||
type: string; // 类型: "text" | "embedding" | "rerank"
|
||||
base_url: string; // API Base URL
|
||||
api_key: string; // API Key
|
||||
@@ -57,7 +57,7 @@ interface TTSModel {
|
||||
id: string;
|
||||
user_id: number;
|
||||
name: string;
|
||||
vendor: string; // "Ali" | "Volcano" | "Minimax" | "硅基流动"
|
||||
vendor: string; // "OpenAI Compatible" | "Ali" | "Volcano" | "Minimax"
|
||||
language: string; // "zh" | "en"
|
||||
voice_list?: string[]; // 支持的声音列表
|
||||
enabled: boolean;
|
||||
@@ -316,7 +316,6 @@ class LLMModelType(str, Enum):
|
||||
|
||||
class LLMModelVendor(str, Enum):
|
||||
OPENAI_COMPATIBLE = "OpenAI Compatible"
|
||||
SILICONFLOW = "SiliconFlow"
|
||||
DIFY = "Dify"
|
||||
FASTGPT = "FastGPT"
|
||||
|
||||
@@ -389,11 +388,11 @@ class ASRModelOut(ASRModelBase):
|
||||
}
|
||||
```
|
||||
|
||||
### SiliconFlow
|
||||
### OpenAI Compatible
|
||||
|
||||
```json
|
||||
{
|
||||
"vendor": "SiliconFlow",
|
||||
"vendor": "OpenAI Compatible",
|
||||
"base_url": "https://api.siliconflow.com/v1",
|
||||
"api_key": "sf-xxx",
|
||||
"model_name": "deepseek-v3"
|
||||
|
||||
@@ -135,21 +135,21 @@ def rebuild_vector_store(reset_doc_status: bool = True):
|
||||
def init_default_data():
|
||||
with db_session() as db:
|
||||
# 检查是否已有数据
|
||||
# SiliconFlow CosyVoice 2.0 预设声音 (8个)
|
||||
# OpenAI Compatible (SiliconFlow API) CosyVoice 2.0 预设声音 (8个)
|
||||
# 参考: https://docs.siliconflow.cn/cn/api-reference/audio/create-speech
|
||||
voices = [
|
||||
# 男声 (Male Voices)
|
||||
Voice(id="alex", name="Alex", vendor="SiliconFlow", gender="Male", language="en",
|
||||
Voice(id="alex", name="Alex", vendor="OpenAI Compatible", gender="Male", language="en",
|
||||
description="Steady male voice.", is_system=True),
|
||||
Voice(id="david", name="David", vendor="SiliconFlow", gender="Male", language="en",
|
||||
Voice(id="david", name="David", vendor="OpenAI Compatible", gender="Male", language="en",
|
||||
description="Cheerful male voice.", is_system=True),
|
||||
# 女声 (Female Voices)
|
||||
Voice(id="bella", name="Bella", vendor="SiliconFlow", gender="Female", language="en",
|
||||
Voice(id="bella", name="Bella", vendor="OpenAI Compatible", gender="Female", language="en",
|
||||
description="Passionate female voice.", is_system=True),
|
||||
Voice(id="claire", name="Claire", vendor="SiliconFlow", gender="Female", language="en",
|
||||
Voice(id="claire", name="Claire", vendor="OpenAI Compatible", gender="Female", language="en",
|
||||
description="Gentle female voice.", is_system=True),
|
||||
]
|
||||
seed_if_empty(db, Voice, voices, "✅ 默认声音数据已初始化 (SiliconFlow CosyVoice 2.0)")
|
||||
seed_if_empty(db, Voice, voices, "✅ 默认声音数据已初始化 (OpenAI Compatible CosyVoice 2.0)")
|
||||
|
||||
|
||||
def init_default_tools(recreate: bool = False):
|
||||
@@ -181,7 +181,7 @@ def init_default_assistants():
|
||||
voice="anna",
|
||||
speed=1.0,
|
||||
hotwords=[],
|
||||
tools=["calculator", "current_time"],
|
||||
tools=["current_time"],
|
||||
interruption_sensitivity=500,
|
||||
config_mode="platform",
|
||||
llm_model_id="deepseek-chat",
|
||||
@@ -215,7 +215,7 @@ def init_default_assistants():
|
||||
voice="alex",
|
||||
speed=1.0,
|
||||
hotwords=["grammar", "vocabulary", "practice"],
|
||||
tools=["calculator"],
|
||||
tools=["current_time"],
|
||||
interruption_sensitivity=400,
|
||||
config_mode="platform",
|
||||
),
|
||||
@@ -294,7 +294,7 @@ def init_default_llm_models():
|
||||
id="deepseek-chat",
|
||||
user_id=1,
|
||||
name="DeepSeek Chat",
|
||||
vendor="SiliconFlow",
|
||||
vendor="OpenAI Compatible",
|
||||
type="text",
|
||||
base_url="https://api.deepseek.com",
|
||||
api_key="YOUR_API_KEY", # 用户需替换
|
||||
@@ -320,7 +320,7 @@ def init_default_llm_models():
|
||||
id="text-embedding-3-small",
|
||||
user_id=1,
|
||||
name="Embedding 3 Small",
|
||||
vendor="OpenAI",
|
||||
vendor="OpenAI Compatible",
|
||||
type="embedding",
|
||||
base_url="https://api.openai.com/v1",
|
||||
api_key="YOUR_API_KEY",
|
||||
@@ -339,7 +339,7 @@ def init_default_asr_models():
|
||||
id="FunAudioLLM/SenseVoiceSmall",
|
||||
user_id=1,
|
||||
name="FunAudioLLM/SenseVoiceSmall",
|
||||
vendor="SiliconFlow",
|
||||
vendor="OpenAI Compatible",
|
||||
language="Multi-lingual",
|
||||
base_url="https://api.siliconflow.cn/v1",
|
||||
api_key="YOUR_API_KEY",
|
||||
@@ -353,7 +353,7 @@ def init_default_asr_models():
|
||||
id="TeleAI/TeleSpeechASR",
|
||||
user_id=1,
|
||||
name="TeleAI/TeleSpeechASR",
|
||||
vendor="SiliconFlow",
|
||||
vendor="OpenAI Compatible",
|
||||
language="Multi-lingual",
|
||||
base_url="https://api.siliconflow.cn/v1",
|
||||
api_key="YOUR_API_KEY",
|
||||
|
||||
Reference in New Issue
Block a user