A simple deepseek client based on Dear ImGui.
Usage: ds-cpp [--help] [--version] [--config VAR] [--api-key VAR] [--disable-backspace VAR] [--wayland VAR]
ds-cpp (3b573825)
https://github.com/fpg2012/ds-cpp
Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
--config path to config.json [nargs=0..1] [default: "config.json"]
--api-key [nargs=0..1] [default: "no_api_key"]
--disable-backspace [nargs=0..1] [default: false]
--wayland [nargs=0..1] [default: false]
Example of config.json
{
"api-key": "sk-xxxxxxxxxx"
}
Chat histories will be stored in a zstd compressed json file, inside chat_history
folder if there exists one.
git clone https://github.com/fpg2012/ds-cpp
Download source code tarballs of the following dependencies, and put them in thirdparty
directory.
- argparse v3.2
- Dear ImGui v1.91.8
- cpr v1.11.2
- glfw v3.4
- nlohmann_json v3.11.3
- ImGuiFileDialog v0.6.7
- stb_image.h
thirdparty
├── argparse
├── cpr
├── glfw
├── ImGuiFileDialog
├── nlohmann_json
├── imgui
└── stb/stb_image.h
如果要用输入法,建议给glfw打个补丁。(否则在打字时,退格不仅会删除输入法中“预编辑”的内容,也会删除输入框里面已经输入好的内容)。 It is recommended to patch glfw if you need to use an input method.
cd ds-cpp/thirdparty/glfw # cd into thirdparty/glfw
patch -p1 < ../../glfw_x11_ime.patch
cd
to the repository directory, and compile everything.
mkdir build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
Use Visual Studio to open the directory, after cmake configuration, build the solution.