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

Add gpt-4o model #743

Open
4rc0s opened this issue May 13, 2024 · 12 comments
Open

Add gpt-4o model #743

4rc0s opened this issue May 13, 2024 · 12 comments
Labels
enhancement New feature or request

Comments

@4rc0s
Copy link

4rc0s commented May 13, 2024

gpt-4o now available and would be great to use. https://platform.openai.com/docs/models/gpt-4o

@4rc0s 4rc0s added the enhancement New feature or request label May 13, 2024
@JanRuettinger
Copy link

Can we tag the new commit that added the model?

@jackmcguire1
Copy link

jackmcguire1 commented May 14, 2024

@vbrunko-voc
Copy link

vbrunko-voc commented May 16, 2024

Do we need to perform migration too?

https://platform.openai.com/docs/assistants/migration

@xiaocode337317439
Copy link

xiaocode337317439 commented May 21, 2024

payload = {
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What’s in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": f"data:image/jpeg;base64,{base64_image}"
          }
        }
      ]
    }
  ],
  "max_tokens": 300
}

response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)

print(response.json())

@RayendraSabandar
Copy link

Do we need to perform migration too?

https://platform.openai.com/docs/assistants/migration

has this migration implemented in the latest version?

I'm trying to use CreateThreadAndRun this function but the ThreadMessage struct has not been updated

type ThreadMessage struct {
	Role     ThreadMessageRole `json:"role"`
	Content  string            `json:"content"`
	FileIDs  []string          `json:"file_ids,omitempty"`
	Metadata map[string]any    `json:"metadata,omitempty"`
}

I think there should be Attachments field, no?

image image

@dezchai
Copy link

dezchai commented Jun 14, 2024

Wasted an hour or two debugging before I realized the new attachments field still isn't supported yet. I'll see if I can create a PR otherwise I hope someone can get to it soon. Right now it's not possible at all to make a request with files with GPT-4o.

@fernandops26
Copy link

Any update here?

@dezchai
Copy link

dezchai commented Jun 18, 2024

Any update here?

@735

@DanDanDD
Copy link

DanDanDD commented Jul 8, 2024

Can I upload pictures and request gpt-4o now?

@mojafa
Copy link

mojafa commented Aug 13, 2024

I switched my model to gpt-4o-mini and got this error:

"message": "Failed to send message to OpenAI: error, status code: 400, message: The requested model 'gpt-4o-mini' cannot be used with the Assistants API in v1. Follow the migration guide to upgrade to v2: https://platform.openai.com/docs/assistants/migration."

any update to switching model to newer version?

@Devin-Licastro
Copy link

With GPT 3.5 being shut down on Sep 14th, it's becoming quite urgent to get Assistants V2 file support into this library.

@pateljoel
Copy link

A friend of mine told me that GPT-4o works, but I can't find anything on this anywhere, does it exist and if not when will support be added as 3.5 doesn't work anymore.

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

No branches or pull requests