|
|
|
@ -247,7 +247,24 @@ public class OpenAI {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Content[] getContent(Spannable ssb, long id, Context context) {
|
|
|
|
|
static class Content {
|
|
|
|
|
private String type;
|
|
|
|
|
private String content;
|
|
|
|
|
|
|
|
|
|
public Content(String type, String content) {
|
|
|
|
|
this.type = type;
|
|
|
|
|
this.content = content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getType() {
|
|
|
|
|
return this.type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getContent() {
|
|
|
|
|
return this.content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Content[] get(Spannable ssb, long id, Context context) {
|
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
List<OpenAI.Content> contents = new ArrayList<>();
|
|
|
|
|
int start = 0;
|
|
|
|
@ -289,23 +306,6 @@ public class OpenAI {
|
|
|
|
|
|
|
|
|
|
return contents.toArray(new OpenAI.Content[0]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static class Content {
|
|
|
|
|
private String type;
|
|
|
|
|
private String content;
|
|
|
|
|
|
|
|
|
|
public Content(String type, String content) {
|
|
|
|
|
this.type = type;
|
|
|
|
|
this.content = content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getType() {
|
|
|
|
|
return this.type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getContent() {
|
|
|
|
|
return this.content;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static class Message {
|
|
|
|
|