Add chat_id, variables, detail, timeout_sec, and send_system_prompt to LLMConfig; update create_llm_service to accept new parameters and handle FastGPT integration. Modify pipeline to utilize chat_id and adjust message handling based on provider settings.
This commit is contained in:
49
config/fastgpt.example.json
Normal file
49
config/fastgpt.example.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"server": {
|
||||
"host": "0.0.0.0",
|
||||
"port": 8000,
|
||||
"cors_origins": ["*"]
|
||||
},
|
||||
"audio": {
|
||||
"sample_rate_hz": 16000,
|
||||
"channels": 1,
|
||||
"frame_ms": 20
|
||||
},
|
||||
"session": {
|
||||
"inactivity_timeout_sec": 60
|
||||
},
|
||||
"agent": {
|
||||
"system_prompt": "FastGPT app owns the system prompt when send_system_prompt is false.",
|
||||
"greeting": "你好",
|
||||
"greeting_mode": "generated"
|
||||
},
|
||||
"services": {
|
||||
"stt": {
|
||||
"provider": "openai",
|
||||
"api_key": "YOUR_STT_KEY",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"model": "gpt-4o-mini-transcribe",
|
||||
"language": "zh"
|
||||
},
|
||||
"llm": {
|
||||
"provider": "fastgpt",
|
||||
"api_key": "fastgpt-xxxxx",
|
||||
"base_url": "http://localhost:3000",
|
||||
"model": "my-voice-app",
|
||||
"chat_id": null,
|
||||
"variables": {
|
||||
"user_name": "访客"
|
||||
},
|
||||
"detail": false,
|
||||
"timeout_sec": 60.0,
|
||||
"send_system_prompt": false
|
||||
},
|
||||
"tts": {
|
||||
"provider": "openai",
|
||||
"api_key": "YOUR_TTS_KEY",
|
||||
"base_url": "https://api.openai.com/v1",
|
||||
"model": "gpt-4o-mini-tts",
|
||||
"voice": "alloy"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user