Skip to content

Commit

Permalink
refactor(testAi.ts): update import statements to use OpenAI type for …
Browse files Browse the repository at this point in the history
…better clarity and maintainability

fix(testAi.ts): change parameter type in generateCommitMessage method to align with OpenAI's updated type definitions
  • Loading branch information
di-sukharev committed Aug 20, 2024
1 parent f9103a3 commit 8f85ee8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/engine/testAi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChatCompletionRequestMessage } from 'openai';
import { AiEngine, AiEngineConfig } from './Engine';
import { OpenAI } from 'openai';

import { AiEngine } from './Engine';

export const TEST_MOCK_TYPES = [
'commit-message',
Expand All @@ -25,7 +26,7 @@ export class TestAi implements TestAiEngine {
}

async generateCommitMessage(
_messages: Array<ChatCompletionRequestMessage>
_messages: Array<OpenAI.Chat.Completions.ChatCompletionMessageParam>
): Promise<string | undefined> {
switch (this.mockType) {
case 'commit-message':
Expand Down

0 comments on commit 8f85ee8

Please sign in to comment.