You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update image ref resolution to use conversation order
File reference resolver now maps image refs (e.g. image_1, image_2) to user-uploaded images in chronological order across the entire conversation, rather than only the latest user message. Updated tool prompt instructions to clarify this behavior for users.
Copy file name to clipboardExpand all lines: src/lib/server/textGeneration/utils/toolPrompt.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,6 @@ export function buildToolPreprompt(tools: OpenAiTool[]): string {
16
16
`Today's date: ${currentDate}.`,
17
17
`If a tool generates an image, you can inline it directly: .`,
18
18
`If a tool needs to operate on an image, set its image input parameter (for example, "input_image") to an image reference string.`,
19
-
`Use "image_1", "image_2", etc. to point to a specific image from a user message with images. You can also reuse a direct image URL from a prior tool result instead of pasting new base64 data.`,
19
+
`Use "image_1", "image_2", etc. where the number equals the chronological order of user-uploaded images in this conversation (image_1 = first image uploaded, image_2 = second, and so on). You can also reuse a direct image URL from a prior tool result instead of pasting new base64 data.`,
0 commit comments