15 lines
426 B
Python
15 lines
426 B
Python
from llm_server import opts
|
|
|
|
|
|
def generator(request_json_body, cluster_backend):
|
|
if opts.mode == 'oobabooga':
|
|
# from .oobabooga.generate import generate
|
|
# return generate(request_json_body)
|
|
raise NotImplementedError
|
|
elif opts.mode == 'vllm':
|
|
from .vllm.generate import generate
|
|
r = generate(request_json_body, cluster_backend)
|
|
return r
|
|
else:
|
|
raise Exception
|