We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76448eb commit 37d5521Copy full SHA for 37d5521
src/backend/services/llm.service.ts
@@ -1,4 +1,4 @@
1
-import OpenAI from 'openai';
+import OpenAI, { toFile } from 'openai';
2
import { Inject, Service } from '@/common/di';
3
import type { ConfigService } from './config.service';
4
import { CONFIG_SERVICE, LLM_SERVICE } from './di-tokens';
@@ -160,7 +160,7 @@ export class LLMService {
160
],
161
});
162
} else {
163
- const file = new File([attachment.content], attachment.name, {
+ const file = await toFile(attachment.content, attachment.name, {
164
type: attachment.mimeType,
165
166
0 commit comments