From e54ae17fccb079068fcffb47050b15bd367136ad Mon Sep 17 00:00:00 2001 From: Vali98 Date: Sun, 1 Dec 2024 20:34:12 +0800 Subject: [PATCH] fix: no samplers for default OpenAI template --- constants/API/DefaultAPI.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/constants/API/DefaultAPI.ts b/constants/API/DefaultAPI.ts index ba4357a..d542981 100644 --- a/constants/API/DefaultAPI.ts +++ b/constants/API/DefaultAPI.ts @@ -27,7 +27,16 @@ export const defaultTemplates: APIConfiguration[] = [ request: { requestType: 'stream', - samplerFields: [], + samplerFields: [ + { externalName: 'max_context_length', samplerID: SamplerID.CONTEXT_LENGTH }, + { externalName: 'max_tokens', samplerID: SamplerID.GENERATED_LENGTH }, + { externalName: 'stream', samplerID: SamplerID.STREAMING }, + { externalName: 'temperature', samplerID: SamplerID.TEMPERATURE }, + { externalName: 'top_p', samplerID: SamplerID.TOP_P }, + { externalName: 'presence_penalty', samplerID: SamplerID.PRESENCE_PENALTY }, + { externalName: 'frequency_penalty', samplerID: SamplerID.FREQUENCY_PENALTY }, + { externalName: 'seed', samplerID: SamplerID.SEED }, + ], completionType: { type: 'chatCompletions', userRole: 'user',