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

Function get_ip

fastchat/serve/gradio_web_server.py:247–252  ·  view source on GitHub ↗
(request: gr.Request)

Source from the content-addressed store, hash-verified

245
246
247def get_ip(request: gr.Request):
248 if "cf-connecting-ip" in request.headers:
249 ip = request.headers["cf-connecting-ip"]
250 else:
251 ip = request.client.host
252 return ip
253
254
255def _prepare_text_with_image(state, text, image):

Callers 15

load_demoFunction · 0.90
vote_last_responseFunction · 0.90
leftvote_last_responseFunction · 0.90
rightvote_last_responseFunction · 0.90
tievote_last_responseFunction · 0.90
regenerateFunction · 0.90
clear_historyFunction · 0.90
share_clickFunction · 0.90
add_textFunction · 0.90
bot_response_multiFunction · 0.90
vote_last_responseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…