ai module

This commit is contained in:
2026-07-23 10:52:29 +03:30
parent 549da39473
commit 27c45974f4
15 changed files with 538 additions and 10 deletions
@@ -0,0 +1,27 @@
export interface AiChatCompletionUsage {
prompt_tokens: number;
completion_tokens: number;
total_tokens: number;
}
export interface AiChatCompletionChoice {
finish_reason?: string | null;
message?: {
role?: string;
content?: string | null;
reasoning_content?: string | null;
};
}
export interface AiChatCompletionResponse {
choices?: AiChatCompletionChoice[];
usage?: AiChatCompletionUsage;
}
export interface AiChatResult {
answer: string;
consumedTokens: number;
cost: number;
promptTokens: number;
completionTokens: number;
}