Skip to content
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

Include an image in a message into a thread #443

Open
leandrosardi opened this issue Mar 24, 2024 · 2 comments
Open

Include an image in a message into a thread #443

leandrosardi opened this issue Mar 24, 2024 · 2 comments

Comments

@leandrosardi
Copy link

leandrosardi commented Mar 24, 2024

I want to create and run a message into a thread, including the URL to an image.

Is it possible to do something like this in the current version?

Example:

            mid = @@openai_client.messages.create(
                'thread_id': @@openai_thread_id,
                'parameters': {
                    'role': "user", # Required for manually created messages
                    'content': "What do you see in this picture?", # Required.
                    'image_url': 'https://static.vecteezy.com/system/resources/thumbnails/039/391/155/small/500-social-media-stories-v2-abstract-shopping-nft-e-commerce-memories-bundle.png',
                },
            )["id"]

            @@openai_message_ids << mid

            # run the assistant
            response = @@openai_client.runs.create(
                thread_id: @@openai_thread_id,
                parameters: {
                    assistant_id: @@openai_assistant_id,
                }
            )
            run_id = response['id']
@willywg
Copy link

willywg commented May 4, 2024

If you are referring to GPT-4 with vision, it's currently not possible with the Assistant API. However, you can use it with the Chat Completions API.

See: https://platform.openai.com/docs/guides/vision

Plese note that the Assistants API does not currently support image inputs.

@willywg
Copy link

willywg commented May 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants