askui
Version:
Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on
40 lines (39 loc) • 2.29 kB
TypeScript
import { BetaMessage, BetaMessageParam } from '@anthropic-ai/sdk/resources/beta/messages';
import { HttpClientGot } from '../utils/http/http-client-got';
import { ControlCommand } from '../core/ui-control-commands';
import { CustomElement } from '../core/model/custom-element';
import { Annotation } from '../core/annotation/annotation';
import { DetectedElement } from '../core/model/annotation-result/detected-element';
import { VQAInferenceResponseBody } from '../core/inference-response/inference-response';
import { ModelCompositionBranch } from './model-composition-branch';
export declare class InferenceClient {
private readonly baseUrl;
private readonly httpClient;
private readonly resize?;
readonly workspaceId?: string | undefined;
readonly modelComposition?: ModelCompositionBranch[] | undefined;
private readonly apiVersion;
private urls;
constructor(baseUrl: string, httpClient: HttpClientGot, resize?: number | undefined, workspaceId?: string | undefined, modelComposition?: ModelCompositionBranch[] | undefined, apiVersion?: string);
isImageRequired(instruction: string): Promise<boolean>;
private resizeIfNeeded;
inference(customElements?: CustomElement[], image?: string, instruction?: string, modelComposition?: ModelCompositionBranch[]): Promise<ControlCommand | Annotation>;
vqaInference(image: string, prompt: string, config?: object): Promise<VQAInferenceResponseBody>;
private static logMetaInformation;
predictControlCommand(instruction: string, modelComposition: ModelCompositionBranch[], customElements?: CustomElement[], image?: string): Promise<ControlCommand>;
getDetectedElements(instruction: string, image: string, customElements?: CustomElement[]): Promise<DetectedElement[]>;
predictImageAnnotation(image: string, customElements?: CustomElement[]): Promise<Annotation>;
predictVQAAnswer(prompt: string, image: string, config?: object): Promise<any>;
predictActResponse(params: {
max_tokens: number;
tool_choice?: {
type: 'tool' | 'any' | 'auto';
name?: string;
};
messages: BetaMessageParam[];
model: string;
system?: string;
tools?: object[];
betas?: string[];
}): Promise<BetaMessage>;
}