MCPcopy
hub / github.com/lm-sys/FastChat / regenerate

Function regenerate

fastchat/serve/gradio_block_arena_anony.py:131–136  ·  view source on GitHub ↗
(state0, state1, request: gr.Request)

Source from the content-addressed store, hash-verified

129
130
131def regenerate(state0, state1, request: gr.Request):
132 logger.info(f"regenerate (anony). ip: {get_ip(request)}")
133 states = [state0, state1]
134 for i in range(num_sides):
135 states[i].conv.update_last_message(None)
136 return states + [x.to_gradio_chatbot() for x in states] + [""] + [disable_btn] * 6
137
138
139def clear_history(request: gr.Request):

Callers

nothing calls this directly

Calls 3

get_ipFunction · 0.90
update_last_messageMethod · 0.80
to_gradio_chatbotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…