Warning
This miniapp is still under development, and may have breaking changes without any notice.
这是一个为有道词典笔设计的工具箱应用,主要功能包括:
AI 助手 - 一个强大的对话式 AI 工具:
- 支持 OpenAI 兼容 API 接口,可使用各种大语言模型
- 提供多轮对话功能,支持上下文记忆
- 对话历史管理,可创建、搜索、编辑和删除对话
- 消息编辑和重新生成,支持同一消息的多个变体(variant)
- 完整的 AI 参数配置:模型选择、温度、TopP、最大长度等
- 自定义系统提示词(system prompt)
- 软键盘输入支持,包括中文拼音输入
- 实时显示账户余额
This is a toolbox application designed for YouDao Dictionary Pen with the following main features:
AI Assistant - A powerful conversational AI tool:
- Supports OpenAI-compatible APIs, allowing use of various large language models
- Multi-turn conversation with context memory
- Conversation history management: create, search, edit, and delete conversations
- Message editing and regeneration with support for message variants
- Full AI parameter configuration: model selection, temperature, TopP, max length, etc.
- Custom system prompts
- Soft keyboard input with Chinese Pinyin support
- Real-time account balance display
Users using this miniapp should have a supported YouDao Dictionary Pen.
- Make sure you have a YouDao Dictionary Pen with
adbenabled. You can use the paper tool to edit adb password easily or refer to these discussions. - Connect your YouDao Dictionary Pen to your computer and login to it using
adb shell auth. - Make sure you have
cmake,make,nodejs,pnpm,iconvinstalled on a Ubuntu computer. - Clone this repository:
git clone https://github.com/langningchen/miniapp.git cd miniapp
On Android:
- Open the shell using
adb shelland run the following command to check the version of system:curl -k -s https://raw.githubusercontent.com/langningchen/miniapp/refs/heads/main/tools/getVersionInfo.sh | bash - Pull the artifacts from the YouDao Dictionary Pen:
adb pull /userdisk/Favorite/versionInfo.tar.gz ./versionInfo.tar.gz
On Ubuntu:
- Extract the
versionInfo.tar.gzfile:tar -xzf versionInfo.tar.gz -C ./jsapi
- Download and extract the correct toolchain in the
jsapi/toolchainsdirectory, your directory structure should look like this:miniapp/ ├── jsapi/ | |-- include/ | | |-- curl/ | | |-- sqlite3/ | |-- lib/ | | ├── libcurl.so | | ├── libsqlite3.so │ ├── src/ │ ├── toolchains/ │ │ ├── <toolchain_name>/ │ │ │ ├── bin/ │ │ │ ├── include/ │ │ │ └── lib/ - Install NodeJS dependencies using
pnpm:pnpm -C ui install
- Modify the NodeJS library:
cd ./ui sed -i "s/commonjs(),/commonjs(),require('@rollup\/plugin-typescript')(),/g" ./node_modules/aiot-vue-cli/src/libs/rollup.config.js sed -i "s/compiler.parseComponent(content, { pad: 'line' })/compiler.parse(content, { pad: 'line' }).descriptor/g" ./node_modules/aiot-vue-cli/web-loaders/falcon-vue-loader/lib/parser.js sed -i "s/path.resolve(__dirname, '.\/vue\/packages\/vue-template-compiler\/index.js')/'@vue\/compiler-sfc'/g" ./node_modules/aiot-vue-cli/cli-libs/index.js sed -i "s/compiler.parseComponent(content, { pad: true })/compiler.parse(content, { pad: true }).descriptor/g" ./node_modules/aiot-vue-cli/src/libs/parser.js sed -i "s/compiler.compile/compiler.compileTemplate/g" ./node_modules/aiot-vue-cli/web-loaders/falcon-vue-loader/lib/template-compiler/index.js sed -i "s/const replaceValues = {}/const replaceValues = { 'defineComponent': '' }/g" ./node_modules/aiot-vue-cli/src/libs/rollup.config.js
- Run the build script:
./tools/build.sh
- After the build is complete, you will find the
miniapp.amrfile in thedistdirectory.
- Upload the
miniapp.amrfile to your YouDao Dictionary Pen usingadb push:adb push miniapp.amr /userdisk/Favorite/miniapp.amr
- Open the shell using
adb shelland run the following command to install the miniapp:miniapp_cli install /userdisk/Favorite/miniapp.amr
- After installation, you can find the miniapp in the app list of your YouDao Dictionary Pen.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
See GitHub Issues.