OpenAI Fixes

This commit is contained in:
Henky!!
2022-03-28 02:02:37 +02:00
parent 77ae893f4d
commit e644963564

View File

@@ -4355,6 +4355,7 @@ def oairequest(txt, min, max):
vars.lastctx = txt vars.lastctx = txt
# Build request JSON data # Build request JSON data
if 'GooseAI' in args.configname:
reqdata = { reqdata = {
'prompt': txt, 'prompt': txt,
'max_tokens': max, 'max_tokens': max,
@@ -4362,13 +4363,22 @@ def oairequest(txt, min, max):
'top_p': vars.top_p, 'top_p': vars.top_p,
'top_k': vars.top_k, 'top_k': vars.top_k,
'tfs': vars.tfs, 'tfs': vars.tfs,
'typical': vars.typical, 'typical_p': vars.typical,
'repetition_penalty': vars.rep_pen, 'repetition_penalty': vars.rep_pen,
'repetition_penalty_slope': vars.rep_pen_slope, 'repetition_penalty_slope': vars.rep_pen_slope,
'repetition_penalty_range': vars.rep_pen_range, 'repetition_penalty_range': vars.rep_pen_range,
'n': 1, 'n': 1,
'stream': False 'stream': False
} }
else:
reqdata = {
'prompt': txt,
'max_tokens': max,
'temperature': vars.temp,
'top_p': vars.top_p,
'n': 1,
'stream': False
}
req = requests.post( req = requests.post(
vars.oaiurl, vars.oaiurl,