fix: add engine in payload for nitro chat completion api
This commit is contained in:
parent
1c5b6355d9
commit
20f0e4301e
@ -341,6 +341,11 @@ export const chatCompletions = async (request: any, reply: any) => {
|
||||
request.body.stop = request.body.stop.slice(0, 4)
|
||||
}
|
||||
|
||||
// add engine for new cortex cpp engine
|
||||
if (requestedModel.engine === 'nitro') {
|
||||
request.body.engine = 'cortex.llamacpp'
|
||||
}
|
||||
|
||||
const fetch = require('node-fetch')
|
||||
const response = await fetch(apiUrl, {
|
||||
method: 'POST',
|
||||
|
||||
@ -6,9 +6,7 @@ import {
|
||||
Model,
|
||||
ModelExtension,
|
||||
OptionType,
|
||||
baseName,
|
||||
fs,
|
||||
joinPath,
|
||||
} from '@janhq/core'
|
||||
|
||||
import { atom, useSetAtom } from 'jotai'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user