Files
xSaherElmAiApi/appsettings.Development.json
T
2026-10-25 22:27:55 +03:30

144 lines
4.6 KiB
JSON

{
"AllowedOrigins": [
"http://localhost:5000",
"https://localhost:5001",
"http://api.saherelm.ir",
"https://api.saherelm.ir",
"http://api.saherelmhub.ir",
"https://api.saherelmhub.ir"
],
"IdentityServiceConfiguration": {
"Authority": "https://localhost:4001",
"ApiName": "xSaherElmAPI",
"ApiSecret": "s@H@1694056",
"ClientId": "xSaherElmAPIClient",
"ClientSecret": "s@H@1694056",
"XPoweredValue": "SaherElmITCenter",
"XRevisionSecretKey": "SaherElmITCenter@1694056",
"DefaultClientTimeout": -1
},
"StorageConfiguration": {
"Authority": "https://localhost:5001",
"IdentityAuthority": "https://localhost:5001",
"Storage": "Storage",
"Temp": "Temp",
"Thumb": "Thumb",
"Uploads": "Uploads",
"Widgets": "Widgets",
"Image": "Image",
"Audio": "Audio",
"Video": "Video",
"Document": "Document",
"FilePrefix": "xSaherElm_",
"ThumbPrefix": "Thumb_",
"ThumbSize": 512,
"ThumbQuality": 72,
"MaxFileSize": 41943040
},
"AiApiConfiguration": {
"Models": [
{
"ApiKey": "",
"Name": "Gemma",
"LLM": "gemma3:1b",
"Provider": "OpenAI",
"Url": "http://178.131.88.93:1112/v1"
},
{
"ApiKey": "",
"Name": "Qwen",
"LLM": "qwen-9b",
"Provider": "OpenAI",
"Url": "http://178.131.88.93:1114/v1"
},
{
"ApiKey": "",
"Name": "Embed",
"LLM": "bge-m3",
"Provider": "OpenAI",
"Url": "http://178.131.88.93:1113/v1"
}
],
"Prompts": [
{
"Name": "Introduction",
"Template": "your name is xSaherElmAi, you are a professional ai assistant which develped by SaherElm IT Center, answer each questions by it's language.",
"Description": "",
"Params": []
},
{
"Name": "ContentExtraction",
"Template": "You are an Expert Powerful OCR Engine. your job isReading all Contents in Given Document and Retrieve them as Raw Text by following these rules: 1. Converst all tables to Markdown format. 2. extract numbers, date and times and names exactly as is. 3. do not add any extra descriptions, introduction or summarization from yourself and just return extracted Content.",
"Description": "",
"Params": []
},
{
"Name": "Embedding",
"Template": "your name is xSaherElmAi, you are a professional ai assistant which develped by SaherElm IT Center specified for Embedding Documents",
"Description": "",
"Params": []
},
{
"Name": "ChatWithDocuments",
"Template": "You are a document question-answering assistant. Answer the user's question ONLY based on the provided Context chunks below. Follow these rules: 1. If the answer is not present in the Context, clearly state that the information was not found in the provided documents and do not make up an answer. 2. When using information from a chunk, cite its source identifier in square brackets (e.g. [file.pdf#3]). 3. Answer in the same language as the user's question. 4. Be concise and precise; do not add unrelated information.",
"Description": "System prompt for RAG based Chat With Documents",
"Params": []
}
],
"OCR": {
"DataPath": "Models",
"EngineMode": "LstmOnly",
"EnableOcrFallback": true,
"DefaultLanguage": "fas+eng"
},
"Transcript": {
"Language": "fa",
"ModelsPath": "Models/ggml-base.bin"
},
"PDFToImageDescriptor": {
"Dpi": 300,
"Width": 0,
"Height": 0,
"UseTiling": false,
"WithFormFill": false,
"WithAspectRatio": false,
"WithAnnotations": false,
"DpiRelativeToBounds": false,
"MaxImageWidth": 2000,
"MinTextLengthThreshold": 50,
"MaxPagesForImageFallback": 0
},
"ProxyConfiguration": {
"Enabled": true,
"RoutePrefix": "/ai-model"
},
"TextChunker": {
"ChunkSize": 800,
"ChunkOverlap": 150,
"MinChunkSize": 50,
"NormalizeWhitespace": true,
"ChunkIdentifierSeparator": "#"
},
"RAGDescriptor": {
"MaxTopK": 20,
"DefaultTopK": 5,
"DefaultTtlMinutes": 30,
"DefaultMinScore": 0.35,
"EmbeddingBatchSize": 32,
"SourceSnippetLength": 200,
"MetadataFileName": "fileName",
"MetadataMimeType": "mimeType",
"PromptName": "ChatWithDocuments",
"MetadataChunkIndex": "chunkIndex"
}
},
"Logging": {
"LogLevel": {
"Microsoft": "Warning",
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}