UNPKG

@craftapit/tester

Version:

A focused, LLM-powered testing framework for natural language test scenarios

35 lines (34 loc) 1.09 kB
import { BaseAdapter } from './BaseAdapter'; import { ScreenState, UIAction } from '../types/actions'; import { LLMAdapter } from './LLMAdapter'; export declare class CraftacoderAdapter extends BaseAdapter implements LLMAdapter { private apiKey; private baseUrl; private model; private provider; constructor(config: { apiKey?: string; baseUrl?: string; model?: string; provider?: string; }); initialize(): Promise<void>; cleanup(): Promise<void>; /** * Complete a prompt with the LLM via Craftacoder API * @param prompt The prompt to complete * @returns The completion text */ complete(prompt: string): Promise<string>; /** * Suggest an action based on the instruction and screen state */ suggestAction(instruction: string, screenState: ScreenState): Promise<UIAction>; /** * Verify if a condition is met based on the screen state */ verifyCondition(condition: string, screenState: ScreenState): Promise<{ success: boolean; reason?: string; }>; }