diff --git a/src/models.ts b/src/models.ts index b8cf316..17735fe 100644 --- a/src/models.ts +++ b/src/models.ts @@ -54,10 +54,11 @@ export async function generateAISDKCompletions>( topP: options?.topP, mode: options?.mode, }) - + const { object, ...rest } = result return { data: result.object, url: page.url, + ...rest } } @@ -108,11 +109,12 @@ export async function generateAISDKCode>( maxTokens: options?.maxTokens, topP: options?.topP, }) - - return { - code: result.text, - url: page.url, - } + const { text, ...rest } = result + return { + code: result.text, + url: page.url, + ...rest, + } } export async function generateLlamaCompletions>(