Skip to content

Commit

Permalink
OV-52: * openai service
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy4 committed Aug 27, 2024
1 parent 08d1e70 commit 0f66887
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/common/services/open-ai/open-ai.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import OpenAI, { type OpenAI as OpenAIType } from 'openai';
import OpenAI from 'openai';

import { type BaseConfig } from '~/common/config/base-config.package.js';

Expand All @@ -8,14 +8,14 @@ import { type OpenAIService as OpenAIServiceType } from './libs/types/types.js';

class OpenAIService implements OpenAIServiceType {
private config: BaseConfig;
private openAi: OpenAIType;
private openAi: OpenAI;

public constructor(config: BaseConfig) {
this.config = config;
this.openAi = this.initOpenAi();
}

private initOpenAi = (): OpenAIType => {
private initOpenAi = (): OpenAI => {
return new OpenAI({
apiKey: this.config.ENV.APP.OPEN_AI_KEY,
});
Expand Down

0 comments on commit 0f66887

Please sign in to comment.