-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.js
37 lines (28 loc) · 962 Bytes
/
api.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const invoke = window.__TAURI__.tauri.invoke;
export async function invokeCompletion(id, messages) {
return await invoke("completion", {id, messages});
}
export async function invokeStartConversation(hint) {
return await invoke("start_conversation", {hint});
}
export async function invokeGetConversations() {
return await invoke("get_conversations");
}
export async function invokeGetConversation(id) {
return await invoke("get_conversation", {id});
}
export async function invokeGetTitle(id) {
return await invoke("get_title", {id});
}
export async function invokeSetTitle(id, title) {
return await invoke("set_title", {id, title});
}
export async function invokeSuggestTitle(id) {
return await invoke("suggest_title", {id});
}
export async function invokeBundledPrompts() {
return await invoke("bundled_prompts");
}
export async function invokeGenerateImage(req) {
return await invoke("generate_image", {req});
}