- Added comprehensive AI Assistant system (aiassist/ directory): * Vector search and embedding capabilities * Typebot proxy integration * Elastic search functionality * Message classification and chat history * MCP proxy for external integrations - Implemented Court Status API (GetCourtStatus.php): * Real-time court document status checking * Integration with external court systems * Comprehensive error handling and logging - Enhanced S3 integration: * Improved file backup system with metadata * Batch processing capabilities * Enhanced error logging and recovery * Copy operations with URL fixing - Added Telegram contact creation API - Improved error logging across all modules - Enhanced callback system for AI responses - Extensive backup file storage with timestamps - Updated documentation and README files - File storage improvements: * Thousands of backup files with proper metadata * Fix operations for broken file references * Project-specific backup and recovery systems * Comprehensive file integrity checking Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
56 lines
2.2 KiB
PHP
56 lines
2.2 KiB
PHP
<?php
|
||
// aiassist/config.php
|
||
|
||
error_reporting(E_ALL);
|
||
ini_set('display_errors', 1);
|
||
ini_set('display_startup_errors', 1);
|
||
ini_set('log_errors', 1);
|
||
ini_set('error_log', __DIR__ . '/logs/php_errors.log');
|
||
|
||
setlocale(LC_ALL, 'ru_RU.UTF-8');
|
||
|
||
// Настройки OpenAI API
|
||
// 🔹 Ваш API-ключ OpenAI
|
||
const OPENAI_API_KEY = 'sk-NsasXO7IPLdzUSNaAy64R3EBveyIZNfIV3PaOEq5_WT3BlbkFJWTivsJpMK1J2YPfVDSMCrU6hQMxwEy64RktHVWEvEA';
|
||
|
||
// 🔹 Базовый URL вашего FastAPI-прокси
|
||
const PROXY_BASE_URL = 'http://195.133.66.13:8080/v1';
|
||
|
||
// 🔹 Путь к разным эндпоинтам через прокси
|
||
const OPENAI_ASSISTANT_API = PROXY_BASE_URL . '/assistants';
|
||
const OPENAI_FILES_API = PROXY_BASE_URL . '/files';
|
||
const OPENAI_THREADS_API = PROXY_BASE_URL . '/threads';
|
||
const OPENAI_VECTOR_STORES_API = PROXY_BASE_URL . '/vector_stores';
|
||
const OPENAI_VISION_API = PROXY_BASE_URL . '/chat/completions';
|
||
const NSFW_MODERATION_API = PROXY_BASE_URL . '/moderations';
|
||
|
||
// 🔹 ID вашего ассистента
|
||
const ASSISTANT_ID = 'asst_IqRznpNPdRE4OeuxxVw8r3VB';
|
||
|
||
|
||
/*
|
||
const OPENAI_API_KEY = 'sk-GS24OxHQYfq8ErW5CRLoN5F1CfJPxNsY';
|
||
const OPENAI_ASSISTANT_API = 'https://api.proxyapi.ru/openai/v1/assistants';
|
||
const OPENAI_FILES_API = 'https://api.proxyapi.ru/openai/v1/files';
|
||
const OPENAI_THREADS_API = 'https://api.proxyapi.ru/openai/v1/threads';
|
||
const OPENAI_VECTOR_STORES_API = 'https://api.proxyapi.ru/openai/v1/vector_stores';
|
||
const OPENAI_VISION_API = 'https://api.proxyapi.ru/openai/v1/chat/completions';
|
||
const NSFW_MODERATION_API = 'https://api.proxyapi.ru/v1/moderation';
|
||
const ASSISTANT_ID = 'asst_suGt51aoepXUkJiC0t3vobeG'; // ЖПТ о1
|
||
*/
|
||
const LOG_FILE = __DIR__ . '/logs/testlog1.log';
|
||
//const ASSISTANT_ID = 'asst_BBfcxdMMoeGiZWDH9s8rLb3Q'; //жпт 4о
|
||
|
||
const ASSISTANT_NAME = 'Clientright';
|
||
|
||
// Подключение к базе данных
|
||
$dsn = 'mysql:host=localhost;port=3306;dbname=ci20465_72new;charset=utf8mb4';
|
||
$dbUser = 'ci20465_72new';
|
||
$dbPassword = 'EcY979Rn';
|
||
|
||
// Настройки Elasticsearch
|
||
if (!defined('ELASTIC_URL')) {
|
||
define('ELASTIC_URL', 'http://localhost:9200');
|
||
}
|
||
?>
|