Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

add support to encode images for GPT 4 vision models#3403

Merged
colombod merged 2 commits into
dotnet:mainfrom
colombod:utility_for_vision
Jan 9, 2024
Merged

add support to encode images for GPT 4 vision models#3403
colombod merged 2 commits into
dotnet:mainfrom
colombod:utility_for_vision

Conversation

@colombod

@colombod colombod commented Jan 8, 2024

Copy link
Copy Markdown
Member

Adding support to encode Images for use in GPT 4 Vision

{
Logger.Log.Event();
var base64Image = image.ToBase64();
return $"data:image/jpeg; base64,{base64Image}";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string fragment looks hard to use correctly. Let's discuss.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@colombod
colombod enabled auto-merge (rebase) January 8, 2024 22:47
@colombod
colombod requested a review from jonsequitur January 8, 2024 22:47

@luisquintanilla luisquintanilla left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @colombod

@colombod
colombod disabled auto-merge January 9, 2024 18:39
@colombod
colombod merged commit 5c25546 into dotnet:main Jan 9, 2024
@colombod
colombod deleted the utility_for_vision branch January 9, 2024 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants