Add missing file
This commit is contained in:
parent
a2e6d00128
commit
f0d66cf817
1 changed files with 11 additions and 0 deletions
11
extensions/openai/logits.py
Normal file
11
extensions/openai/logits.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue