mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-30 22:20:14 +01:00
12 lines
415 B
Python
12 lines
415 B
Python
|
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)
|