Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libs/chatchat-server/chatchat/webui_pages/kb_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def on_conv_change():
# mic_audio = audio_recorder("", icon_size="2x", key="mic_audio")
prompt = cols[2].chat_input(chat_input_placeholder, key="prompt")
if prompt:
history = get_messages_history(ctx.get("history_len", 0))
# history = get_messages_history(ctx.get("history_len", 0)) # there is not history_len key in the ctx dict. So that get_messages_history return empty. Need to change the history_len value in ctx dict.
history = get_messages_history(history_len)
messages = history + [{"role": "user", "content": prompt}]
chat_box.user_say(prompt)

Expand Down