Skip to content

Commit 769eee1

Browse files
kelvieoobabooga
andcommittedFeb 18, 2025
Fix OpenAI API with new param (show_after), closes #6747 (#6749)
--------- Co-authored-by: oobabooga <[email protected]>
1 parent 7c883ef commit 769eee1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎modules/chat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def generate_chat_reply(text, state, regenerate=False, _continue=False, loading_
412412
yield history
413413
return
414414

415-
show_after = html.escape(state["show_after"]) if state["show_after"] else None
415+
show_after = html.escape(state.get("show_after")) if state.get("show_after") else None
416416
for history in chatbot_wrapper(text, state, regenerate=regenerate, _continue=_continue, loading_message=loading_message, for_ui=for_ui):
417417
if show_after:
418418
after = history["visible"][-1][1].partition(show_after)[2] or "*Is thinking...*"

0 commit comments

Comments
 (0)
Please sign in to comment.