Merge pull request #4664 from oobabooga/dev

Merge dev branch
This commit is contained in:
oobabooga 2023-11-19 15:12:55 -03:00 committed by GitHub
commit f11092ac2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,11 @@
from extensions.openai.completions import process_parameters
from modules.logits import get_next_logits
def _get_next_logits(body):
# Pre-process the input payload to simulate a real generation
use_samplers = body['use_samplers']
state = process_parameters(body) if use_samplers else {}
state['stream'] = True
return get_next_logits(body['prompt'], state, use_samplers, "", return_dict=True)