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 · 5 comments
Open

Add gpt-4o model #743

4rc0s opened this issue May 13, 2024 · 5 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

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

6 participants