diff options
Diffstat (limited to 'apps/workers')
| -rw-r--r-- | apps/workers/openaiWorker.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/workers/openaiWorker.ts b/apps/workers/openaiWorker.ts index ec5681c6..f8a775e6 100644 --- a/apps/workers/openaiWorker.ts +++ b/apps/workers/openaiWorker.ts @@ -162,7 +162,7 @@ async function inferTagsFromImage( ), metadata.contentType, base64, - { json: true, abortSignal }, + { schema: openAIResponseSchema, abortSignal }, ); } @@ -235,7 +235,10 @@ async function inferTagsFromPDF( `Content: ${bookmark.asset.content}`, serverConfig.inference.contextLength, ); - return inferenceClient.inferFromText(prompt, { json: true, abortSignal }); + return inferenceClient.inferFromText(prompt, { + schema: openAIResponseSchema, + abortSignal, + }); } async function inferTagsFromText( @@ -244,7 +247,7 @@ async function inferTagsFromText( abortSignal: AbortSignal, ) { return await inferenceClient.inferFromText(await buildPrompt(bookmark), { - json: true, + schema: openAIResponseSchema, abortSignal, }); } |
