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

Function regenerate

fastchat/serve/gradio_block_arena_named.py:119–124  ·  view source on GitHub ↗
(state0, state1, request: gr.Request)

Source from the content-addressed store, hash-verified

117
118
119def regenerate(state0, state1, request: gr.Request):
120 logger.info(f"regenerate (named). ip: {get_ip(request)}")
121 states = [state0, state1]
122 for i in range(num_sides):
123 states[i].conv.update_last_message(None)
124 return states + [x.to_gradio_chatbot() for x in states] + [""] + [disable_btn] * 6
125
126
127def 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…