feat: configure audio providers and add local sample acceptance

This commit is contained in:
2026-10-07 18:15:32 +08:00
parent 70be2fc70f
commit fea33285e8
21 changed files with 1103 additions and 131 deletions
+15 -1
View File
@@ -26,5 +26,19 @@ return [
'ffmpeg' => (string) env('followup_audio.FFMPEG', 'ffmpeg'),
'ffprobe' => (string) env('followup_audio.FFPROBE', 'ffprobe'),
'max_response_bytes' => 8388608,
// No audio-specific provider key or fallback: prescription_ai.base_url/models are reused.
// HTTP is permitted only for explicitly acknowledged synthetic probes, never patient requests.
'allow_insecure_synthetic' => filter_var(env('followup_audio.ALLOW_INSECURE_SYNTHETIC', false), FILTER_VALIDATE_BOOLEAN),
// Stable logical slots preserve task schema. No model identifier or supplier is hardcoded.
'providers' => array_combine(['qwen', 'openai'], array_map(static function (string $profile): array {
$prefix = 'followup_audio.' . strtoupper($profile) . '_';
return [
'driver' => (string) env($prefix . 'DRIVER', 'dify'),
// Only the dify driver may reuse empty base/key fields from prescription_ai.
'base_url' => (string) env($prefix . 'BASE_URL', ''),
'api_key' => (string) env($prefix . 'API_KEY', ''),
'model' => (string) env($prefix . 'MODEL', ''),
'label' => (string) env($prefix . 'LABEL', $profile),
'verified_fingerprint' => (string) env($prefix . 'VERIFIED_FINGERPRINT', ''),
];
}, ['qwen', 'openai'])),
];