UNPKG

spaider

Version:

Deterministic-first AI code assistant that crawls your codebase to implement changes using open source LLMs

21 lines 1.14 kB
import OpenAI from "openai"; import { z } from "zod"; import { Intent, FileContext, Change } from "../lib/types"; import { ChatCompletionCreateParamsNonStreaming } from "openai/resources/chat/completions"; import { RequestOptions } from "openai/core"; export declare namespace AI { function complete(body: Partial<ChatCompletionCreateParamsNonStreaming>, options?: RequestOptions): Promise<OpenAI.Chat.Completions.ChatCompletion & { _request_id?: string | null; }>; function completeStructured<T>(params: { role?: string; user: string; schema: z.Schema; name: string; }): Promise<T>; function analyzeIntent(userPrompt: string, files: FileContext[], _projectTree?: string): Promise<Intent>; function generateChanges(_userPrompt: string, intent: Intent, files: FileContext[], _projectTree?: string): Promise<Change[]>; function applyFileChanges(changes: Change[], currentFileContent: string): Promise<string>; function generateAnswer(_userPrompt: string, intent: Intent, files: FileContext[], _projectTree?: string): Promise<string>; } //# sourceMappingURL=ai.d.ts.map