chore: add default inference parameters for custom remote models (#4584)

This commit is contained in:
Louis 2025-02-05 21:21:36 +07:00 committed by GitHub
parent f2f31d8dc8
commit b79edc225b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,21 @@ export default class JSONEngineManagementExtension extends EngineManagementExten
async addRemoteModel(model: Model) {
return this.queue
.add(() =>
ky.post(`${API_URL}/v1/models/add`, { json: model }).then((e) => e)
ky
.post(`${API_URL}/v1/models/add`, {
json: {
inference_params: {
max_tokens: 8192,
temperature: 0.7,
top_p: 0.95,
stream: true,
frequency_penalty: 0,
presence_penalty: 0,
},
...model,
},
})
.then((e) => e)
)
.then(() => {})
}