feat(ai): InferenceProvider interface
Task 11 of the slice plan. Single-method provider contract (name + generate + healthCheck) so future LAN / external API implementations can drop in without touching AiWorker. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
src/main/ai/InferenceProvider.ts
Normal file
10
src/main/ai/InferenceProvider.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { AiResponse } from './schema.js';
|
||||
|
||||
export interface GenerateInput { text: string; }
|
||||
export interface HealthResult { ok: boolean; model?: string; reason?: string; }
|
||||
|
||||
export interface InferenceProvider {
|
||||
readonly name: string;
|
||||
generate(input: GenerateInput): Promise<AiResponse>;
|
||||
healthCheck(): Promise<HealthResult>;
|
||||
}
|
||||
Reference in New Issue
Block a user