Skip to content

Commit

Permalink
fix: adjusted mime type for jpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
theoremonemehdi committed Oct 1, 2024
1 parent ed4d9b1 commit 91f9c3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/kurt-open-ai/src/KurtOpenAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function toOpenAIMessages(messages: KurtMessage[]): OpenAIMessage[] {

// OpenAI only supports the following MIME types, according to these docs:
// https://platform.openai.com/docs/guides/vision
if (!mimeType.match(/^image\/(jpg|png|webp|gif)$/))
if (!mimeType.match(/^image\/(jpeg|png|webp|gif)$/))
throw new Error(`Unsupported image MIME type: ${mimeType}`) // TODO: Use a subclass of KurtError

const url = `data:${mimeType};base64,${base64Data}`
Expand Down

0 comments on commit 91f9c3e

Please sign in to comment.