-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for gpt-4-vision #413
base: main
Are you sure you want to change the base?
Conversation
support the content in chat completion with format https://platform.openai.com/docs/guides/vision
I would love it if this or #423 could be added |
Excuse me , Do these code in class
because I found that these changed to 'finish_details' in GPT-4V's return value, like:
|
Yes, I've noticed too, and I've already made the changes. Thank you very much for your suggestion. |
I really don't like the parameterized ChatMessage, it completely breaks my entire code. It'll be better with something like @JsonInclude() // content should always exist in the call, even if it is null
Object content; public ChatMessage(String role, List<ChatMessageContent> content) {
this.role = role;
this.content = content;
}
public ChatMessage(String role, List<ChatMessageContent> content, String name) {
this.role = role;
this.content = content;
this.name = name;
}
public ChatMessage(String role, String content) {
this.role = role;
this.content = content;
}
public ChatMessage(String role, String content, String name) {
this.role = role;
this.content = content;
this.name = name;
}
@JsonIgnore
public String getStringContent() {
return content instanceof String ? (String) content : null;
} This atleast keeps the code compatible |
with a few modifications that removes parameterized `ChatMessage`
when can we have this feature merged ? |
I wonder if we could speed up the merger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
@JanCong, is this ever going to be merged? |
support the content in chat completion with format https://platform.openai.com/docs/guides/vision