🐛 (ai) Fix vision on URL that contains whitespaces
This commit is contained in:
@ -9,7 +9,7 @@ export const splitUserTextMessageIntoBlocks = async ({
|
|||||||
input,
|
input,
|
||||||
shouldDownloadImages,
|
shouldDownloadImages,
|
||||||
}: Props): Promise<UserContent> => {
|
}: Props): Promise<UserContent> => {
|
||||||
const urlRegex = /(^|\n\n)(https?:\/\/[^\s]+)(\n\n|$)/g
|
const urlRegex = /(^|\n\n)(https?:\/\/.+)(\n\n|$)/g
|
||||||
const match = input.match(urlRegex)
|
const match = input.match(urlRegex)
|
||||||
if (!match) return input
|
if (!match) return input
|
||||||
let parts: (TextPart | ImagePart)[] = []
|
let parts: (TextPart | ImagePart)[] = []
|
||||||
|
Reference in New Issue
Block a user