fix:prompt

This commit is contained in:
aries-ckt 2023-05-18 15:39:28 +08:00
parent e8a7fd4546
commit b92ecf2199

View File

@ -254,7 +254,7 @@ def http_bot(state, mode, sql_mode, db_selector, temperature, max_new_tokens, re
result = prompt_template.format(context="\n".join(context), question=query)
state.messages[-2][1] = result
prompt = state.get_prompt()
print("prompt length:" + len(prompt))
print("prompt length:" + str(len(prompt)))
if len(prompt) > 4000:
logger.info("prompt length greater than 4000, rebuild")