85 lines
2.0 KiB
JavaScript
85 lines
2.0 KiB
JavaScript
/**
|
|
* Default Settings
|
|
*
|
|
* Дефолтные настройки приложения.
|
|
*/
|
|
|
|
/**
|
|
* Default settings structure for Brief Bench
|
|
* User-editable fields only - server configuration managed by FastAPI backend
|
|
*/
|
|
export const defaultSettings = {
|
|
// Active environment
|
|
activeEnvironment: 'ift', // 'ift', 'psi', or 'prod'
|
|
|
|
// Environment-specific settings
|
|
environments: {
|
|
ift: {
|
|
name: 'ИФТ',
|
|
apiMode: 'bench', // 'bench' or 'backend'
|
|
|
|
// Optional headers for RAG backend
|
|
bearerToken: '', // Bearer token for authorization (optional)
|
|
systemPlatform: '', // System-Platform header (optional)
|
|
systemPlatformUser: '', // System-Platform-User header (optional)
|
|
|
|
// Backend mode settings
|
|
platformUserId: '',
|
|
platformId: '',
|
|
withClassify: false,
|
|
resetSessionMode: true // Reset session after each question
|
|
},
|
|
psi: {
|
|
name: 'ПСИ',
|
|
apiMode: 'bench', // 'bench' or 'backend'
|
|
|
|
// Optional headers for RAG backend
|
|
bearerToken: '',
|
|
systemPlatform: '',
|
|
systemPlatformUser: '',
|
|
|
|
// Backend mode settings
|
|
platformUserId: '',
|
|
platformId: '',
|
|
withClassify: false,
|
|
resetSessionMode: true
|
|
},
|
|
prod: {
|
|
name: 'ПРОМ',
|
|
apiMode: 'bench', // 'bench' or 'backend'
|
|
|
|
// Optional headers for RAG backend
|
|
bearerToken: '',
|
|
systemPlatform: '',
|
|
systemPlatformUser: '',
|
|
|
|
// Backend mode settings
|
|
platformUserId: '',
|
|
platformId: '',
|
|
withClassify: false,
|
|
resetSessionMode: true
|
|
}
|
|
},
|
|
|
|
// UI settings
|
|
theme: 'light',
|
|
autoSaveDrafts: true,
|
|
requestTimeout: 1800000, // 30 minutes in milliseconds
|
|
|
|
// Query settings
|
|
defaultWithDocs: true,
|
|
defaultQueryMode: 'questions' // 'questions' or 'raw-json'
|
|
}
|
|
|
|
/**
|
|
* Default environment state structure
|
|
*/
|
|
export const defaultEnvironmentState = {
|
|
currentRequest: null,
|
|
currentResponse: null,
|
|
currentAnswerIndex: 0,
|
|
annotations: {},
|
|
requestTimestamp: null,
|
|
requestId: null
|
|
}
|