
palm1r/llmqore
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
AI/LLM プロバイダーおよび MCP と連携するための Qt C++ ライブラリ
概要
クラウドおよびローカルLMプロバイダー、MCPクライアント、サーバー、およびACPエージェント向けのQt/C++ライブラリ。 deltas のストリーミングは、オブジェクトのスレッドに Qt 信号として到着し、QFuture として非同期の結果、所有権は QObject の子孫に従います。 コア、ネットワーク、同時接続 - —クラウドとローカル:Claude、OpenAIチャットの完了、OpenAIレスポンス、Google AI、Mistral、DeepSeek、Qwen、Ollama、llama.cpp。 ストリーミングまたはバッファリング、画像、推論、トークンの使用、キャンセル - - ベースツールのサブクラス、ツールループが含まれている、QFutureによってゲートされた、stdio上のクライアントとサーバーのエージェント、ストリーミング可能なHTTPまたはレガシーSSE、 1つのツールレジストリを共有し、Claudeサーバーが翻訳されたすべてのサーバーは、Claudeサーバーを1つのサーバーに渡します。 または、チャットパネルで望むものである、それが到着します。 蓄積された受領者は、これまでの回答全体を運ぶ; chunkReceivedは、新しいデルタだけを運ぶ.
概要(AI 翻訳)
クラウドおよびローカルLMプロバイダー、MCPクライアント、サーバー、およびACPエージェント向けのQt/C++ライブラリ。
deltas のストリーミングは、オブジェクト自身のスレッドで Qt シグナルとして到着します。
[QFuture], 所有権は[QObject]]に続く。 [Core, [Network] に対するリンク
[Concurrent]。
それが何をするか
-LLM REST API - クラウドとローカル:Claude、OpenAIチャットの完了、OpenAIレスポンス、Google AI、Mistral、DeepSeek、Qwen、Ollama、llama.cpp。 ストリーミングまたはバッファリング、画像、推論、トークンの使用、キャンセル
- ツールコール — [[[
BaseTool]]]サブクラス、ツールループ([QFutureによってゲート)) - MCP — クライアントとサーバーを stdio, ストリーム可能な HTTP またはレガシー SSE, 1 つのツールレジストリを共有します。; [
mcp-bridge] CLI は 1 つのエンドポイントの背後にある多くの上流サーバーを配置します。 - 会話 — 1つの歴史、各プロバイダーの形状に翻訳、それらの間でポータブル
- ** ACP host** — JSON レジストリの任意のエージェント; Claude コードとコーデックスを出荷
#LLM REST API の使い方
回答を依頼してお待ちください。
または、チャットパネルで望むものである、それが到着します。
[[accumulatedReceived] は、これまでの回答全体を運びます。 [chunkReceived]] は、新しいだけを運ぶ
デルタ.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
LLMQore
Qt/C++ library for cloud and local LLM providers, MCP clients and servers, and ACP agents.
Streaming deltas arrive as Qt signals on the object’s own thread, async results as
QFuture, ownership follows QObject parent-child. Links against Core, Network and
Concurrent.
What it does
- LLM REST API — cloud and local: Claude, OpenAI Chat Completions, OpenAI Responses, Google AI, Mistral, DeepSeek, Qwen, Ollama, llama.cpp; streaming or buffered, images in, reasoning out, token usage, cancellation
- Tool calling — your
BaseToolsubclass, tool loop included, gated byQFutureif you want - MCP — client and server over stdio, Streamable HTTP or legacy SSE, sharing one tool registry;
mcp-bridgeCLI puts many upstream servers behind one endpoint - Conversation — one history, translated into each provider’s shape, portable between them
- ACP host — any agent in the JSON registry; ships Claude Code and Codex
LLM REST API
Ask and await the answer:
auto *client = new LLMQore::ClaudeClient(
"https://api.anthropic.com", apiKey, "claude-sonnet-4-5", this);
client->askOnce("What is Qt?").then(this, [this](const LLMQore::CompletionInfo &result) {
m_view->setPlainText(result.fullText);
});
Or watch it arrive, which is what you want in a chat panel:
connect(client, &LLMQore::BaseClient::accumulatedReceived,
this, [this](const LLMQore::RequestID &, const QString &answer) {
m_view->setPlainText(answer);
});
client->ask("What is Qt?");
accumulatedReceived carries the whole answer so far; chunkReceived carries only the new
delta. Both are emitted on the client’s own thread, so a direct connection into a widget or
model is safe.
Tool calling
Expose a function over data the provider cannot see — the open document, the current selection, a local database:
client->tools()->addTool(new SearchCurrentFileTool(client));
conversation.addUser("Where do we handle the timeout?");
client->ask(conversation);
The client drives the loop: the model requests the tool, executeAsync runs, the result is
sent back, the model answers. setMaxToolContinuations() bounds it, ten rounds by default.
toolStarted and toolResultReady report progress; setExecutionGate() gates each call
behind a QFuture.
MCP
Using external tools
Tools from an MCP server enter the same registry and reach the model through the same tool-definition array:
client->tools()->addMcpServer({.name = "filesystem", .command = "npx",
インストール
npx -y @modelcontextprotocol/server-filesystem /home/user設定
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
}
}
}