Disable probability viewer and output streaming when using API
This commit is contained in:
parent
82ae749396
commit
55c4acad8f
|
@ -6952,6 +6952,10 @@ def _generate_text(body: GenerationInputSchema):
|
||||||
vars.disable_set_aibusy = True
|
vars.disable_set_aibusy = True
|
||||||
_standalone = vars.standalone
|
_standalone = vars.standalone
|
||||||
vars.standalone = True
|
vars.standalone = True
|
||||||
|
show_probs = vars.show_probs
|
||||||
|
vars.show_probs = False
|
||||||
|
output_streaming = vars.output_streaming
|
||||||
|
vars.output_streaming = False
|
||||||
for key, entry in mapping.items():
|
for key, entry in mapping.items():
|
||||||
obj = {"vars": vars, "vars.formatoptns": vars.formatoptns}[entry[0]]
|
obj = {"vars": vars, "vars.formatoptns": vars.formatoptns}[entry[0]]
|
||||||
if getattr(body, key, None) is not None:
|
if getattr(body, key, None) is not None:
|
||||||
|
@ -6983,6 +6987,8 @@ def _generate_text(body: GenerationInputSchema):
|
||||||
setattr(obj, entry[1], saved_settings[key])
|
setattr(obj, entry[1], saved_settings[key])
|
||||||
vars.disable_set_aibusy = disable_set_aibusy
|
vars.disable_set_aibusy = disable_set_aibusy
|
||||||
vars.standalone = _standalone
|
vars.standalone = _standalone
|
||||||
|
vars.show_probs = show_probs
|
||||||
|
vars.output_streaming = output_streaming
|
||||||
if vars.allowsp and getattr(body, "soft_prompt", None) is not None:
|
if vars.allowsp and getattr(body, "soft_prompt", None) is not None:
|
||||||
spRequest(old_spfilename)
|
spRequest(old_spfilename)
|
||||||
set_aibusy(0)
|
set_aibusy(0)
|
||||||
|
|
Loading…
Reference in New Issue