(messages: LLMChatMessage[])
| 404 | } |
| 405 | |
| 406 | function 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 | |
| 416 | export function GPTChatFormatToPhind(chatMessages: ChatGPTMessage[]): string { |
| 417 | const roleToName = { |
nothing calls this directly
no outgoing calls
no test coverage detected