这是indexloc提供的服务,不要输入任何密码
Skip to content

add vision api support for assistants #80

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static class MessageRequestBuilder {
private Object content;
private List<Attachment> attachments;
private Map<String, String> metadata;
@Deprecated
public MessageRequestBuilder content(String content) {
this.content = content;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ImageFile {

/**
Expand All @@ -22,4 +21,14 @@ public class ImageFile {
String fileId;

String detail;

public ImageFile(String fileId) {
this.fileId = fileId;
this.detail = "low";
}

public ImageFile(String fileId, String detail) {
this.fileId = fileId;
this.detail = detail;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class ImageContent {
@JsonProperty("input_audio")
private InputAudio inputAudio;


public ImageContent(String text) {
this.type = "text";
this.text = text;
Expand All @@ -56,6 +55,11 @@ public ImageContent(ImageUrl imageUrl) {
this.imageUrl = imageUrl;
}

public ImageContent(ImageFile imageFile) {
this.type = "image_file";
this.imageFile = imageFile;
}

/**
* @deprecated {@link #ofImagePath(Path)}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public MultiMediaContent(ImageUrl imageUrl) {
this.imageUrl = imageUrl;
}

public MultiMediaContent(ImageFile imageFile) {
this.type = "image_file";
this.imageFile = imageFile;
}

public MultiMediaContent(InputAudio inputAudio) {
this.type = "input_audio";
this.inputAudio = inputAudio;
Expand Down