NODEDC_1C/llm_normalizer/frontend/src/state/defaults.ts

30 lines
1.7 KiB
TypeScript
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.

import type { ConnectionState, PromptState, QueryState } from "./types";
export const DEFAULT_CONNECTION: ConnectionState = {
llmProvider: "openai",
apiKey: "",
model: "gpt-4o-mini",
baseUrl: "https://api.openai.com/v1",
temperature: 0,
maxOutputTokens: 700
};
export const DEFAULT_PROMPTS: PromptState = {
systemPrompt: "Ты semantic-normalizer для бухгалтерского ассистента NDC. Возвращай только JSON по схеме normalized_query_v2_0_2.",
developerPrompt:
"Сначала делай decomposition сообщения на task fragments, затем определяй domain scope и route-critical flags. Для каждого fragment заполняй execution_readiness + route_status + no_route_reason. Если fragment routable, не оставляй его в no_route.",
domainPrompt:
"Контур: данные текущего предприятия в 1С/NDC. In-scope: документы, проводки, взаиморасчеты, остатки, периодное закрытие, аномалии и контрольные проверки. Out-of-scope: общая теория, законы и оффтоп.",
schemaNotes: "schema_version: normalized_query_v2_0_2. Строгий JSON без дополнительных полей.",
fewShotExamples:
"Q: Проверь по поставщикам хвосты и разложи цепочку документов/оплат. => fragment in_scope, flags: multi_entity + chain_explanation. Q: Как вообще по ФСБУ? => out_of_scope/generic_accounting."
};
export const DEFAULT_QUERY: QueryState = {
userQuestion: "",
batchQuestionsRaw: "",
periodHint: "",
businessContext: "",
expectedRoute: ""
};