MCPcopy Create free account
hub / github.com/Shinplex/rever / formatMessagesForRetool

Function formatMessagesForRetool

retool.ts:169–179  ·  view source on GitHub ↗
(messages: ChatMessage[])

Source from the content-addressed store, hash-verified

167// Utility logic
168// ----------------------------------------------------------------------------
169function formatMessagesForRetool(messages: ChatMessage[]) {
170 let out = "";
171 for (const m of messages) {
172 const role = m.role === "user" ? "Human" : "Assistant";
173 out += `\n\n${role}: ${m.content}`;
174 }
175 if (messages.length && messages[messages.length - 1].role === "assistant") {
176 out += "\n\nHuman: "; // prompt for next user msg
177 }
178 return out;
179}
180
181function getBestRetoolAccount(modelId: string) {
182 const now = Date.now();

Callers 1

handleRequestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected