-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with including images in the request specifically in the JSON structure #2754
Comments
May you provide an example? Each vendor employs a unique method for image response. |
I will activate Logs and then send you the exact problem and explain it in detail. |
For clarification, the issue occurs when sending a request via the API or in the main interface of G4F. When I upload an image for interpretation or analysis and then ask a related question in a new message within the same conversation, the model forgets the image or does not include it in the request. I want the image to be included in the request and context so that the model can reference it when answering follow-up questions. |
It is preferable for the request to be like this and for G4F to accept it because the basic format in G4F is that the image should always be at the bottom of the body.
|
I believe the issue has been resolved in the latest update. Image selections should persist across requests. A media selection box with image preview is now implemented. @AzizDXT |
I will retest the interface again I didn't notice there was an update five hours ago. |
The problem still exists. I will send you an example of the exact problem and it will become clear to you what the problem is. |
Look at my conversation here, and you’ll see that the image is still prioritized. Based on my analysis, when the image is at the bottom of the JSON section, the AI gives it priority for analysis or explanation. I just want the request to be modified before being sent to the providers so that the image's position aligns with the message, rather than always being at the end of the request.
(7 words, 26 chars, 9 tokens) User Input:"explain this pic" (3 words, 14 chars, 3 tokens)
(144 words, 744 chars, 235 tokens) User Input:"how are you?" (3 words, 9 chars, 4 tokens)
(126 words, 574 chars, 163 tokens) User Input:"5 * 5?" (2 words, 2 chars, 5 tokens)
(67 words, 351 chars, 98 tokens) |
I found the solution and it is simple, just add a system message stating that |
Understood, @AzizDXT . However, I will not implement this solution as it is only compatible with Blackbox. We require a more universally applicable feature. |
Exactly, I will try to find a comprehensive solution to this problem, and if I find I may contribute to the development of G4F. |
📌 Issue Title:
AI Prioritizes Image Requests Over Text Due to JSON Structure
📝 Description:
I am encountering an issue where, when sending both a text request and an image request together, the AI prioritizes the image over the text. This seems to happen because the image request appears at the end of the JSON structure, making the AI treat it as the latest message and focus on it instead of processing the text properly.
🔍 Problem Details:
⚡ Expected Behavior:
💡 Possible Solutions (Suggestions):
The text was updated successfully, but these errors were encountered: