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

Method append_message

fastchat/conversation.py:287–289  ·  view source on GitHub ↗

Append a new message.

(self, role: str, message: str)

Source from the content-addressed store, hash-verified

285 self.system_message = system_message
286
287 def append_message(self, role: str, message: str):
288 """Append a new message."""
289 self.messages.append([role, message])
290
291 def update_last_message(self, message: str):
292 """Update the last output.

Callers 15

get_gen_paramsFunction · 0.95
conversation.pyFile · 0.80
mainFunction · 0.80
add_textFunction · 0.80
mainFunction · 0.80
add_textFunction · 0.80
add_textFunction · 0.80
mainFunction · 0.80
chat_loopFunction · 0.80
get_model_answersFunction · 0.80
get_answerFunction · 0.80

Calls

no outgoing calls

Tested by 2

mainFunction · 0.64
mainFunction · 0.64