mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
feat(server): migrate copilot provider sdk (#11584)
fix AI-15 fix AI-16
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Injectable, OnApplicationBootstrap } from '@nestjs/common';
|
||||
import OpenAI from 'openai';
|
||||
|
||||
import {
|
||||
Cache,
|
||||
@@ -46,7 +45,7 @@ export class CopilotContextService implements OnApplicationBootstrap {
|
||||
private setup() {
|
||||
const configure = this.config.copilot.providers.openai;
|
||||
if (configure.apiKey) {
|
||||
this.client = new OpenAIEmbeddingClient(new OpenAI(configure));
|
||||
this.client = new OpenAIEmbeddingClient(configure);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user