logo
Browse Source

Update

Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
main
junjie.jiang 1 year ago
parent
commit
4ed9f5b5c3
  1. 5
      __init__.py
  2. 2
      template_prompt.py

5
__init__.py

@ -1,4 +1,5 @@
from typing import List
from .template_prompt import TemplatePrompt
def template(temp: str):
return TemplatePrompt(temp)
def template(temp: str, keys: List[str]):
return TemplatePrompt(temp, keys)

2
template_prompt.py

@ -15,7 +15,7 @@ class TemplatePrompt(PyOperator):
else:
history = args[-1]
kws = {(item[0], item[1]) for item in zip(self._keys, args)}
kws = dict((item[0], item[1]) for item in zip(self._keys, args))
prompt_str = self._template.format(**kws)
ret = [{'question': prompt_str}]

Loading…
Cancel
Save