This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
2023-08-23 20:12:38 -06:00
|
|
|
from llm_server import opts
|
|
|
|
|
|
|
|
|
|
|
|
def generator(request_json_body):
|
|
|
|
if opts.mode == 'oobabooga':
|
2023-08-23 20:33:49 -06:00
|
|
|
from .oobabooga.generate import generate
|
2023-08-23 20:12:38 -06:00
|
|
|
return generate(request_json_body)
|
|
|
|
elif opts.mode == 'hf-textgen':
|
2023-08-23 20:33:49 -06:00
|
|
|
from .hf_textgen.generate import generate
|
2023-08-23 20:12:38 -06:00
|
|
|
return generate(request_json_body)
|
|
|
|
else:
|
|
|
|
raise Exception
|