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

Class State

fastchat/serve/gradio_web_server.py:95–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95class State:
96 def __init__(self, model_name):
97 self.conv = get_conversation_template(model_name)
98 self.conv_id = uuid.uuid4().hex
99 self.skip_next = False
100 self.model_name = model_name
101
102 def to_gradio_chatbot(self):
103 return self.conv.to_gradio_chatbot()
104
105 def dict(self):
106 base = self.conv.dict()
107 base.update(
108 {
109 "conv_id": self.conv_id,
110 "model_name": self.model_name,
111 }
112 )
113 return base
114
115
116def set_global_vars(controller_url_, enable_moderation_):

Callers 3

add_textFunction · 0.90
add_textFunction · 0.90
add_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…