Add gpt-4o model
Opened this issue · 8 comments
4rc0s commented
gpt-4o
now available and would be great to use. https://platform.openai.com/docs/models/gpt-4o
JanRuettinger commented
Can we tag the new commit that added the model?
jackmcguire1 commented
vbrunko-voc commented
Do we need to perform migration too?
xiaocode337317439 commented
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 commented
Do we need to perform migration too?
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](https://private-user-images.githubusercontent.com/86864902/332781949-3b81b696-2b2a-4754-a234-2c5f26b8ab6b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk0MzMsIm5iZiI6MTcxOTYzOTEzMywicGF0aCI6Ii84Njg2NDkwMi8zMzI3ODE5NDktM2I4MWI2OTYtMmIyYS00NzU0LWEyMzQtMmM1ZjI2YjhhYjZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDA1MzIxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5N2RmOTk1ZDI3M2MxMDBmNzE5MTY2MTc3NTFmMDRlZGRiY2I1OGVmODU0MTJiODcwY2M2YTE3ZmYwYjkwZDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.91jsH-hQilxmqDb7v1FZzFlie_amw5tJb_FiEwoXKIc)
![image](https://private-user-images.githubusercontent.com/86864902/332782317-849a93b1-9d83-42e4-898f-5ee43f5db779.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk0MzMsIm5iZiI6MTcxOTYzOTEzMywicGF0aCI6Ii84Njg2NDkwMi8zMzI3ODIzMTctODQ5YTkzYjEtOWQ4My00MmU0LTg5OGYtNWVlNDNmNWRiNzc5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDA1MzIxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljYWU5MTY2YThiYTE4N2Y3NzRhYzk0NDYyZTlhOWRhYTQ4NzU3N2Q3MGIwMjUyNDk3YWI3ZGZiMTU1ZGJiOTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.em_XD06OzPgAUFG6xaXps2kbhZDo4RSdWVffkY8pSaY)
dezchai commented
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 commented
Any update here?