Browse Source
Update
Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
main
1 changed files with
2 additions and
2 deletions
-
eqa_search.py
|
@ -89,10 +89,10 @@ def _get_llm_op(config): |
|
|
return ops.LLM.OpenAI(model_name=config.openai_model, api_key=config.openai_api_key) |
|
|
return ops.LLM.OpenAI(model_name=config.openai_model, api_key=config.openai_api_key) |
|
|
if config.llm_src.lower() == 'dolly': |
|
|
if config.llm_src.lower() == 'dolly': |
|
|
return ops.LLM.Dolly(model_name=config.dolly_model) |
|
|
return ops.LLM.Dolly(model_name=config.dolly_model) |
|
|
if config.llm_src.lower() == ' ernie': |
|
|
|
|
|
|
|
|
if config.llm_src.lower() == 'ernie': |
|
|
return ops.LLM.Ernie(api_key=config.ernie_api_key, secret_key=config.ernie_secret_key) |
|
|
return ops.LLM.Ernie(api_key=config.ernie_api_key, secret_key=config.ernie_secret_key) |
|
|
|
|
|
|
|
|
raise RuntimeError('Unknown llm source: [%s], only support \'openai\' and \'dolly\'' % (config.llm_src)) |
|
|
|
|
|
|
|
|
raise RuntimeError('Unknown llm source: [%s], only support openai, dolly and ernie' % (config.llm_src)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _get_prompt(config): |
|
|
def _get_prompt(config): |
|
|