enh: autocompletion

This commit is contained in:
Timothy Jaeryang Baek
2024-11-30 00:29:27 -08:00
parent ba6dc71810
commit 1f53e0922e
7 changed files with 77 additions and 15 deletions

View File

@@ -403,6 +403,7 @@ export const generateAutoCompletion = async (
token: string = '',
model: string,
prompt: string,
messages?: object[],
type: string = 'search query',
) => {
const controller = new AbortController();
@@ -419,6 +420,7 @@ export const generateAutoCompletion = async (
body: JSON.stringify({
model: model,
prompt: prompt,
...(messages && { messages: messages }),
type: type,
stream: false
})