mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-29 21:26:05 +00:00
fix:prompt
This commit is contained in:
parent
e8a7fd4546
commit
b92ecf2199
@ -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)
|
result = prompt_template.format(context="\n".join(context), question=query)
|
||||||
state.messages[-2][1] = result
|
state.messages[-2][1] = result
|
||||||
prompt = state.get_prompt()
|
prompt = state.get_prompt()
|
||||||
print("prompt length:" + len(prompt))
|
print("prompt length:" + str(len(prompt)))
|
||||||
|
|
||||||
if len(prompt) > 4000:
|
if len(prompt) > 4000:
|
||||||
logger.info("prompt length greater than 4000, rebuild")
|
logger.info("prompt length greater than 4000, rebuild")
|
||||||
|
Loading…
Reference in New Issue
Block a user