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 model #596

Open
sotowang opened this issue Nov 18, 2023 · 7 comments
Open

support gpt-4-vision-preview model #596

sotowang opened this issue Nov 18, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@sotowang
Copy link

Please provide support for the gpt-4-vision-preview model. The ChatCompletionMessage is currently not useful for gpt-4-vision-preview.

@sotowang sotowang added the enhancement New feature or request label Nov 18, 2023
@xiaoyi510
Copy link

+1

@rkintzi
Copy link
Contributor

rkintzi commented Nov 18, 2023

Duplicates #539
Awaiting PR: #580

@WhiteNightMo
Copy link

+1

@NicksonYap
Copy link

yeapp, looking forward for vision support as well!

@anhao
Copy link

anhao commented Dec 8, 2023

When will the new version be released?

@NicksonYap
Copy link

@anhao it seems to have been merged
#580

but no docs yet

@yashrao99
Copy link

Not sure if people have updated the docs, but here is a simple working example uploading a base64 image to the vision API!

		Model:     openai.GPT4VisionPreview,
		MaxTokens: 1000,
		Messages: []openai.ChatCompletionMessage{
			{
				Role: openai.ChatMessageRoleUser,
				MultiContent: []openai.ChatMessagePart{
					{
						Type: openai.ChatMessagePartTypeText,
						Text: "What's in this image?",
					},
					{
						Type: openai.ChatMessagePartTypeImageURL,
						ImageURL: &openai.ChatMessageImageURL{
							URL:    fmt.Sprintf("data:image/jpg;base64,%s", imgString),
							Detail: openai.ImageURLDetailLow,
						},
					},
				},
			},
		},
	})```

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

7 participants