mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
OpenAI Fixes
This commit is contained in:
12
aiserver.py
12
aiserver.py
@@ -4355,6 +4355,7 @@ def oairequest(txt, min, max):
|
||||
vars.lastctx = txt
|
||||
|
||||
# Build request JSON data
|
||||
if 'GooseAI' in args.configname:
|
||||
reqdata = {
|
||||
'prompt': txt,
|
||||
'max_tokens': max,
|
||||
@@ -4362,13 +4363,22 @@ def oairequest(txt, min, max):
|
||||
'top_p': vars.top_p,
|
||||
'top_k': vars.top_k,
|
||||
'tfs': vars.tfs,
|
||||
'typical': vars.typical,
|
||||
'typical_p': vars.typical,
|
||||
'repetition_penalty': vars.rep_pen,
|
||||
'repetition_penalty_slope': vars.rep_pen_slope,
|
||||
'repetition_penalty_range': vars.rep_pen_range,
|
||||
'n': 1,
|
||||
'stream': False
|
||||
}
|
||||
else:
|
||||
reqdata = {
|
||||
'prompt': txt,
|
||||
'max_tokens': max,
|
||||
'temperature': vars.temp,
|
||||
'top_p': vars.top_p,
|
||||
'n': 1,
|
||||
'stream': False
|
||||
}
|
||||
|
||||
req = requests.post(
|
||||
vars.oaiurl,
|
||||
|
Reference in New Issue
Block a user