Files
ai-shiliu/legacy/config.php
figmar 81115dc23d 初始提交:识流 AI 助手项目
微信自动回复机器人,基于截图+OCR识别消息,支持关键词规则和 AI(OpenAI/DeepSeek/Dify)自动回复。
技术栈:PySide6 + Flask + Vue3 + RapidOCR + SQLite

注:OCR大模型文件(.onnx / .pdiparams)不纳入版本控制,需单独下载。

🤖 Generated with [Qoder][https://qoder.com]
2026-05-30 15:09:40 +08:00

45 lines
1.5 KiB
PHP
Raw Permalink 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
// 基础配置文件,请根据你的环境修改
// 数据库配置
define('DB_HOST', '127.0.0.1');
define('DB_PORT', '3306');
define('DB_NAME', 'shiliu_ai');
define('DB_USER', 'root');
define('DB_PASS', 'root');
define('DB_CHARSET', 'utf8mb4');
// AI 大模型配置(以 OpenAI / DeepSeek / Dify 为例,可自行替换为其他厂商)
// 可选值mock / openai / deepseek / dify
define('AI_PROVIDER', 'dify'); // 先用deepseekDify有401错误
// OpenAI 兼容接口配置
define('OPENAI_API_KEY', 'YOUR_OPENAI_API_KEY_HERE');
define('OPENAI_API_BASE', 'https://api.openai.com/v1');
define('OPENAI_MODEL', 'gpt-4.1-mini');
// DeepSeek 兼容接口配置(请在这里填入你自己的 key
define('DEEPSEEK_API_KEY', 'sk-012531a0108d4fe086fcba34e1c758fe');
define('DEEPSEEK_API_BASE', 'https://api.deepseek.com');
define('DEEPSEEK_MODEL', 'deepseek-chat');
// Dify 配置(请填入你的 Dify API Key 和 URL
define('DIFY_API_KEY', 'app-a9dofsiQi4e157uDYTx8Lrja'); // 在Dify后台获取
define('DIFY_API_BASE', 'http://47.92.48.126/v1'); // 修改v1 → api
define('DIFY_USER', 'wechat_user'); // 用户标识
// 系统基础配置
define('APP_TIMEZONE', 'Asia/Shanghai');
date_default_timezone_set(APP_TIMEZONE);
// 简单的 JSON 输出工具
function json_response($data, int $code = 200)
{
http_response_code($code);
header('Content-Type: application/json; charset=utf-8');
echo json_encode($data, JSON_UNESCAPED_UNICODE);
exit;
}