40 lines
797 B
TypeScript
40 lines
797 B
TypeScript
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 AiChatOfferedFood {
|
|
id: string;
|
|
title?: string;
|
|
desc?: string;
|
|
content?: string[];
|
|
price?: number;
|
|
images?: string[];
|
|
discount: number;
|
|
isSpecialOffer: boolean;
|
|
}
|
|
|
|
export interface AiChatResult {
|
|
answer: string;
|
|
foods: AiChatOfferedFood[];
|
|
consumedTokens: number;
|
|
cost: number;
|
|
promptTokens: number;
|
|
completionTokens: number;
|
|
}
|