MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / format_prompt

Function format_prompt

subprojects/llama.cpp/tools/server/chat.mjs:57–61  ·  view source on GitHub ↗
(question)

Source from the content-addressed store, hash-verified

55const instruction = `A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.`
56
57function format_prompt(question) {
58 return `${instruction}\n${
59 chat.map(m =>`### Human: ${m.human}\n### Assistant: ${m.assistant}`).join("\n")
60 }\n### Human: ${question}\n### Assistant:`
61}
62
63async function tokenize(content) {
64 const result = await fetch(`${API_URL}/tokenize`, {

Callers 1

chat_completionFunction · 0.85

Calls 2

mapMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected