ds-sfcoe-ailabs
Version:
AI-powered code review tool with static analysis integration for comprehensive code quality assessment.
19 lines (18 loc) • 719 B
TypeScript
import AIProvider from './aiProvider.js';
import { ReviewHint, ReviewResponse } from './index.js';
export default class OpenAiClient extends AIProvider {
/**
* Reviews code using OpenAI's GPT model
*
* @param codeSnippet - The code to be reviewed
* @param hints - Array of review hints from static analysis tools
* @returns Promise that resolves to the AI review response
* @throws Error if the API request fails or response is invalid
* @example
* ```typescript
* const response = await client.reviewCode(codeSnippet, hints);
* console.log(response.comments);
* ```
*/
reviewCode(codeSnippet: string, hints: ReviewHint[]): Promise<ReviewResponse>;
}