Files
zyt/server/config/prescription_ai.php
T
2026-08-11 17:39:41 +08:00

41 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* 处方库 AI 解释(Dify Chat App /chat-messages
*
* 每个模型必须对应一个在 Dify 中锁定好实际模型的独立 App Key。
* App Key 只能配置在服务端环境变量中,禁止下发到管理端浏览器。
*/
return [
'enable' => filter_var(
env('prescription_ai.ENABLE', env('prescription_ai.enable', true)),
FILTER_VALIDATE_BOOLEAN
),
'base_url' => rtrim((string) env(
'prescription_ai.BASE_URL',
env('prescription_ai.base_url', '')
), '/'),
'timeout' => (int) env(
'prescription_ai.TIMEOUT',
env('prescription_ai.timeout', 90)
),
'models' => [
'qwen' => [
'name' => 'qwen3.6-35b',
'label' => '千问',
'api_key' => (string) env(
'prescription_ai.QWEN_API_KEY',
env('prescription_ai.qwen_api_key', '')
),
],
'openai' => [
'name' => 'gpt-5.6-sol',
'label' => 'OpenAI',
'api_key' => (string) env(
'prescription_ai.OPENAI_API_KEY',
env('prescription_ai.openai_api_key', '')
),
],
],
];