MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / combineMessagesForHFEndpoints

Function combineMessagesForHFEndpoints

lib/queryLLM.ts:406–414  ·  view source on GitHub ↗
(messages: LLMChatMessage[])

Source from the content-addressed store, hash-verified

404}
405
406function combineMessagesForHFEndpoints(messages: LLMChatMessage[]): string {
407 return messages
408 .map((m) =>
409 m.role !== "function"
410 ? `<|${m.role}|>\n${m.content}</s>`
411 : `function ${m.name} called\n${m.content}</s>`,
412 )
413 .join("\n");
414}
415
416export function GPTChatFormatToPhind(chatMessages: ChatGPTMessage[]): string {
417 const roleToName = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected