MCPcopy Create free account
hub / github.com/pywebio/PyWebIO / messages

Method messages

demos/chatgpt.py:122–128  ·  view source on GitHub ↗

Get all messages of the conversation

(self)

Source from the content-addressed store, hash-verified

120 return self.latest_nonstream_finish_reason
121
122 def messages(self) -> List[Dict]:
123 """Get all messages of the conversation """
124 if self.pending_stream_reply:
125 self._messages.append({"role": "assistant", "content": self.pending_stream_reply.result()})
126 self.pending_stream_reply = None
127
128 return self._messages
129
130
131def get_openai_config():

Callers 1

mainFunction · 0.95

Calls 2

appendMethod · 0.80
resultMethod · 0.80

Tested by

no test coverage detected