跳到正文
Skillpedia
提示词与 LLM81k · #1689

chat-format

它能做什么

这项技能把一组聊天消息转换为本地 AI 模型所期望的确切文本格式。适用于在自己电脑上运行 AI 模型、需要正确格式化提示词的人。

适用场景

  • ✓当你运行本地模型,需要以其模板格式提供提示词的时候。
  • ✓当你需要一个小型路由器,把问题分配给几个已命名意图之一的时候。
  • ✓当你为 llama.cpp、Ollama 或类似的本地运行环境准备提示词的时候。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ruvllm/skills/chat-format/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ruvllm/skills/chat-format/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把这段对话格式化为我本地 llama3 模型的提示词。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能接收消息和模板名称,并返回格式化后的文本。它不调用任何模型。可选的路由器只保存少量模式,用于在不同意图之间做选择。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Chat Format

Format prompts for multi-provider LLM inference with context retrieval.

When to use

When you need a prompt string in a local model's chat template (for llama.cpp, Ollama or another local runtime), or a small embedding-based router over a handful of patterns. It does not call a model and it does not format for hosted APIs: Anthropic, OpenAI and Gemini take structured messages, not a template string.

Steps

  1. Format chat — call mcp__plugin_ruflo-core_ruflo__ruvllm_chat_format with messages ([{role, content}]) and template: one of llama3, mistral, chatml, phi, gemma, or a model id to auto-detect. Both fields are required. It returns the formatted string. It needs @ruvector/ruvllm-wasm (npm i -g @ruvector/ruvllm-wasm); without it the call fails with an install hint.
  2. Create a router (optional) — ruvllm_hnsw_create with dimensions (for example 384), maxPatterns, efSearch. The WASM router holds about 11 patterns at most (ruvllm-wasm v2.0.1), so use it for routing between a few named intents, not for document retrieval. For real document search use memory_search or the ruflo-rag-memory plugin.
  3. Add patterns — ruvllm_hnsw_add with routerId, a name, and an embedding whose length equals the router's dimensions (you produce the embedding, for example with embeddings_generate).
  4. Route a query — ruvllm_hnsw_route with routerId, the query embedding, and k (default 3).
  5. Check status — ruvllm_status shows whether the WASM module loaded. Routers live in the MCP server process only; they are gone when it restarts.
常见问题

它能用于托管的 AI API 吗?

不能。来源说明托管的 API 接收的是结构化消息,而不是模板字符串。

路由器最多能保存多少个模式?

最多约 11 个,因此它适合在几个意图之间路由,而不是用于搜索文档。

我需要安装什么?

一个小型 WASM 附加软件包。如果缺少,这项技能会提示安装。

详情

作者的原始描述

Format chat messages in a local model's template (llama3, mistral, chatml, phi, gemma, or a model id) and route queries over a small WASM HNSW pattern index (about 11 patterns). Use when preparing prompts for local runtimes.

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1689
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能