MCPcopy
hub / github.com/yihong0618/xiaogpt / add_message

Method add_message

xiaogpt/bot/base_bot.py:54–58  ·  view source on GitHub ↗
(self, query: str, message: str)

Source from the content-addressed store, hash-verified

52 return ms
53
54 def add_message(self, query: str, message: str) -> None:
55 self.history.append([f"{query}", message])
56 # only keep 5 history
57 first_history = self.history.pop(0)
58 self.history = [first_history] + self.history[-5:]

Callers 6

askMethod · 0.80
ask_streamMethod · 0.80
askMethod · 0.80
ask_streamMethod · 0.80
askMethod · 0.80
ask_streamMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected