Add 'hallucinations' filter #326

This breaks the API since a new parameter has been added.
It should be a one-line fix. See api-example.py.
This commit is contained in:
oobabooga 2023-03-15 11:04:30 -03:00
parent 128d18e298
commit 9d6a625bd6
5 changed files with 25 additions and 18 deletions

View file

@ -24,6 +24,7 @@ params = {
'top_p': 0.9,
'typical_p': 1,
'repetition_penalty': 1.05,
'encoder_repetition_penalty': 1.0,
'top_k': 0,
'min_length': 0,
'no_repeat_ngram_size': 0,
@ -45,6 +46,7 @@ response = requests.post(f"http://{server}:7860/run/textgen", json={
params['top_p'],
params['typical_p'],
params['repetition_penalty'],
params['encoder_repetition_penalty'],
params['top_k'],
params['min_length'],
params['no_repeat_ngram_size'],