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

Support gpt-4-vision-preview #134

Closed
sloganking opened this issue Nov 7, 2023 · 4 comments
Closed

Support gpt-4-vision-preview #134

sloganking opened this issue Nov 7, 2023 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sloganking
Copy link

https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo

I imagine gpt-4 vision is going to have some API differences compared to normal language models that just take text instead of files. Supporting it would probably be desirable to many people however.

@64bit
Copy link
Owner

64bit commented Nov 7, 2023

Hey, just published DevDay released on v0.16.0. Please give it a try, if you find any issues PRs are welcome!

@64bit 64bit added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 17, 2023
@ludberg
Copy link

ludberg commented Nov 23, 2023

How would we add something like this?
image

I think I've found the corresponding code - do you have an example on how to use it?
image

@tiderjian
Copy link

tiderjian commented Dec 20, 2023

How would we add something like this? image

I think I've found the corresponding code - do you have an example on how to use it? image


let request = CreateChatCompletionRequestArgs::default()
    .max_tokens(4096u16)
    .model("gpt-4")
    .messages([
        ChatCompletionRequestSystemMessageArgs::default()
            .content("You are a helpful assistant.")
            .build().unwrap()
            .into(),
        ChatCompletionRequestUserMessageArgs::default()
            .content(vec!(
                ChatCompletionRequestMessageContentPartTextArgs::default().text(payload.prompt).build().unwrap().into(),
ChatCompletionRequestMessageContentPartImageArgs::default().image_url(payload.image).build().unwrap().into(),
            ))
            .build().unwrap()
            .into(),
        
    ])
    .build().unwrap();

@64bit
Copy link
Owner

64bit commented Mar 18, 2024

This was addressed in #203 hence closing

@64bit 64bit closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants