Skip to content

Commit 37d5521

Browse files
author
Tobias S. Keller
committed
fix: type error in file extraction
1 parent 76448eb commit 37d5521

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/services/llm.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import OpenAI from 'openai';
1+
import OpenAI, { toFile } from 'openai';
22
import { Inject, Service } from '@/common/di';
33
import type { ConfigService } from './config.service';
44
import { CONFIG_SERVICE, LLM_SERVICE } from './di-tokens';
@@ -160,7 +160,7 @@ export class LLMService {
160160
],
161161
});
162162
} else {
163-
const file = new File([attachment.content], attachment.name, {
163+
const file = await toFile(attachment.content, attachment.name, {
164164
type: attachment.mimeType,
165165
});
166166

0 commit comments

Comments
 (0)