feat(server): migrate copilot provider sdk (#11584)

fix AI-15
fix AI-16
This commit is contained in:
darkskygit
2025-04-10 04:14:09 +00:00
parent 0cf8e078e2
commit 5199a74426
12 changed files with 477 additions and 704 deletions
@@ -1,5 +1,4 @@
import { Injectable } from '@nestjs/common';
import OpenAI from 'openai';
import {
AFFiNELogger,
@@ -49,7 +48,7 @@ export class CopilotContextDocJob {
this.supportEmbedding =
await this.models.copilotContext.checkEmbeddingAvailable();
this.client = new OpenAIEmbeddingClient(
new OpenAI(this.config.copilot.providers.openai)
this.config.copilot.providers.openai
);
}