gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

None of the Vision Models work

Open aach360 opened this issue 2 months ago • 2 comments

According to docs, image I have tried all of these Vision Models and none of them work.

Code as provided:

import g4f
import requests
from g4f.client import Client
import g4f.Provider.Blackbox	

image = requests.get("https://raw.githubusercontent.com/xtekky/gpt4free/refs/heads/main/docs/cat.jpeg", stream=True).raw
# Or: image = open("docs/cat.jpeg", "rb")

client = Client(
    provider=g4f.Provider.Blackbox
)

response = client.chat.completions.create(
    model="gemini-pro",
    messages=[
        {
            "role": "user",
            "content": "What are on this image?"
        }
    ],
    image=image
    # Add any other necessary parameters
)

print(response.choices[0].message.content)

Output Recived: "I am sorry, I do not have access to any image content or real-time information, including the internet. Therefore, I cannot provide any information about the image or what it contains."

When I used the blackbox ai, the output was as follows: "There is no image provided in the context. The context only mentions a Github Repository code, but it's empty. If you provide the actual code or image, I'll be happy to help you with your question."

I would greatly appreciate any help with a functional model/provider/code or any insights in general you may have. Thanks!

Environment

  • python version 3.12.7
  • location: USA

aach360 avatar Dec 01 '24 04:12 aach360