Grag ex1.1 (#1123)
Signed-off-by: Rita Brugarolas <rita.brugarolas.brufau@intel.com> Signed-off-by: theresa <theresa.shan@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: theresa <theresa.shan@intel.com>
This commit is contained in:
@@ -70,7 +70,11 @@ def align_outputs(self, data, cur_node, inputs, runtime_graph, llm_parameters_di
|
||||
# handle template
|
||||
# if user provides template, then format the prompt with it
|
||||
# otherwise, use the default template
|
||||
prompt = inputs.messages[0]["content"]
|
||||
print("outputs before align:\n", inputs)
|
||||
if isinstance(inputs.messages, str):
|
||||
prompt = inputs.messages
|
||||
else:
|
||||
prompt = inputs.messages[0]["content"]
|
||||
chat_template = llm_parameters_dict["chat_template"]
|
||||
if chat_template:
|
||||
prompt_template = PromptTemplate.from_template(chat_template)
|
||||
|
||||
Reference in New Issue
Block a user