From 3375c9dba72b47cee26e1a2b6d442289ee7c1ace Mon Sep 17 00:00:00 2001 From: JinmingYang <2214962083@qq.com> Date: Mon, 26 Jun 2023 01:08:17 +0800 Subject: [PATCH] docs: add docs for global --- .gitignore | 2 - CODEOWNERS | 8 ++ README.md | 149 ++++++++++++++++++++- package.json | 3 +- packages/gpt-runner-cli/README.md | 97 ++++++++++---- packages/gpt-runner-config/build.config.ts | 16 --- packages/gpt-runner-config/package.json | 51 ------- packages/gpt-runner-config/src/index.ts | 2 - packages/gpt-runner-config/tsconfig.json | 3 - packages/gpt-runner-core/LICENSE | 21 +++ packages/gpt-runner-vscode/LICENSE | 21 +++ packages/gpt-runner/LICENSE | 21 +++ packages/gpt-runner/README.md | 61 +++++++++ playground/scripts/gpt/best.gpt.md | 2 +- playground/scripts/gpt/gpt-runner.gpt.md | 15 ++- pnpm-lock.yaml | 15 --- scripts/copy-files.ts | 6 +- tsconfig.json | 1 - 18 files changed, 364 insertions(+), 130 deletions(-) create mode 100644 CODEOWNERS delete mode 100644 packages/gpt-runner-config/build.config.ts delete mode 100644 packages/gpt-runner-config/package.json delete mode 100644 packages/gpt-runner-config/src/index.ts delete mode 100644 packages/gpt-runner-config/tsconfig.json create mode 100644 packages/gpt-runner-core/LICENSE create mode 100644 packages/gpt-runner-vscode/LICENSE create mode 100644 packages/gpt-runner/LICENSE create mode 100644 packages/gpt-runner/README.md diff --git a/.gitignore b/.gitignore index 064c0e1..8c4e830 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,6 @@ dist examples/**/pnpm-lock.yaml node_modules playground/.vscode -packages/gpt-runner/README.md -packages/gpt-runner-vscode/LICENSE result.json .svelte-kit .eslintcache diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..aa821b9 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,8 @@ +* @2214962083 +packages/gpt-runner @2214962083 +packages/gpt-runner-cli @2214962083 +packages/gpt-runner-core @2214962083 +packages/gpt-runner-shared @2214962083 +packages/gpt-runner-vscode @2214962083 +packages/gpt-runner-web @2214962083 + diff --git a/README.md b/README.md index ee48928..9fa30c7 100644 --- a/README.md +++ b/README.md @@ -1 +1,148 @@ -no... \ No newline at end of file +
+icon + +

GPT Runner

+ +English / [简体中文](./README_CN.md) + +Manage ai presets. Chat with your code files. Revolutionize Your Team's Collaboration and Efficiency! + +管理 ai 预设。 与您的代码文件聊天。 彻底改变您团队的协作和效率! + +[![CLI][cli-image]][cli-url] +[![Web][web-image]][web-url] +[![VSCode][vscode-image]][vscode-url] + +[CLI](https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-cli/) / [Web App](https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-web/) / [VSCode Extension](https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-vscode/) / [Issues](https://github.com/nicepkg/gpt-runner/issues) / [Buy Me a Coffee](https://bmc.link/jinmingyang) + +[终端工具](https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-cli/) / [网页版](https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-web/) / [VSCode 扩展](https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-vscode/) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [打赏开发者](https://github.com/nicepkg/gpt-runner/assets/35005637/98a4962a-8a2e-4177-8781-1e1ee886ecdc) + +[cli-url]: ./packages/gpt-runner-cli/ +[cli-image]: https://img.shields.io/badge/CLI-Node.js-green?logo=node.js +[web-url]: ./packages/gpt-runner-web/ +[web-image]: https://img.shields.io/badge/Web-React-blue?logo=react +[vscode-url]: ./packages/gpt-runner-vscode/ +[vscode-image]: https://img.shields.io/badge/VSCode-Extension-blue?logo=visualstudiocode + +
+ +## Features + +- `CLI` and `IDE Extension`: `GPT-Runner` provides a robust command-line interface to launch a web interface and IDE extension that retrieves all `xxx.gpt.md` files in your project. These files serve as AI-powered robot presets, making the `GPT-Runner` accessible to virtually any IDE and ensuring an efficient AI workflow. + +- AI Robot Preset-based Chats: Developers can create chats based on `xxx.gpt.md` files, with Git version management support, fostering team collaboration and seamless communication. + +- Customizable AI Parameters: The `xxx.gpt.md` files offer flexibility to specify system prompts, user prompts, model names, temperature, and much more. Empower your team to extract maximum value from a single file with continuous maintenance and improvement. + +- LLM Adaptation: `GPT-Runner` supports both openai's `API key` method and `access token` method, and the future is not only openai, because it is built on `langchainjs`, so it is easy to adapt to third-party LLM ! + +- Privacy first, all data stored locally in your PC. + +- Web Link Share: You can share the `GPT-Runner` web interface through the `LAN ip`, or use the `Tunnel` function provided by the `CLI` to enable temporary `Gradio link` sharing. + +- Web Theme: `GPT-Runner` supports light and dark themes. it support `VSCode Dark` and `VSCode Light` and `Jetbrains Dark` and `Jetbrains Light`. By the way. The theme will auto change with your VSCode current theme style when you use `VSCode Extension`. BTW, it's Responsive design ! + +- Web I18n: English, 简体中文, 繁体中文, 日本語, Deutsch + +## Documentation + +Read the [documentation](https://gpt-runner.nicepkg.cn/) for more details. + +## Roadmap + +- [ ] Jetbrains Plugin: Add Jetbrains IDE Plugin +- [ ] Export Chat History: Add dialogue import and export function, compatible with OpenAI specification +- [ ] AI Preset Store: Add AI Preset Store for community sharing AI Preset File +- [ ] Template Interpolation: Add template interpolation support +- [ ] Electron: Add an Electron client to expand the target audience to non-developers + +## What's New + +- 🚀 v1.0.0: First Release + +## 主要功能 + +- `CLI` 和 `IDE 扩展`:`GPT-Runner` 提供了强大的命令行界面,用于启动 Web 界面和 IDE 扩展,以检索项目中的所有 `xxx.gpt.md` 文件。这些文件作为 AI 支持的机器人预设,使得 `GPT-Runner` 可以适用于几乎任何 IDE,并确保高效的 AI 工作流程。 + +- 以 AI 机器人预设为基础的聊天:开发人员可以基于 `xxx.gpt.md` 文件创建聊天,支持 Git 版本管理,促进团队协作和无缝沟通。 + +- 自定义 AI 参数:`xxx.gpt.md` 文件可以灵活地指定系统提示、用户提示、模型名称、温度等。通过持续维护和改进,赋予团队从单个文件中提取最大价值的能力。 + +- LLM 适配:`GPT-Runner` 支持 openai 的 `API key` 方式和 `access token` 方式,未来不仅支持 openai,因为它基于 `langchainjs` 构建,所以很容易适应第三方 LLM! + +- 隐私优先,所有数据存储在您的个人电脑上。 + +- Web 链接分享:您可以通过 `局域网 ip` 分享 `GPT-Runner` Web 界面,或者使用 `CLI` 提供的 `Tunnel` 功能启用临时的 `Gradio 链接` 分享。 + +- Web 主题:`GPT-Runner` 支持亮色和暗色主题。支持 `VSCode Dark`、`VSCode Light`、`Jetbrains Dark` 和 `Jetbrains Light`。顺便说一下,在使用 `VSCode 扩展` 时,主题会根据您当前的 VSCode 主题样式自动切换。此外, ui 是响应式设计! + +- Web 国际化支持:English, 简体中文, 繁体中文, 日本語, Deutsch + +## 文档 + +阅读 [文档](https://gpt-runner.nicepkg.cn/) 以获取更多详细信息。 + +## 开发计划 + +- [ ] Jetbrains 插件:添加 Jetbrains IDE 插件 +- [ ] 导出聊天记录:添加对话导入导出功能,兼容OpenAI规范 +- [ ] AI预设商店:添加AI预设商店以供社区共享AI预设文件 +- [ ] 模板插值:添加模板插值支持 +- [ ] Electron:添加 Electron 客户端,将目标受众推广到非开发人员 + +## 最新动态 + +- 🚀 v1.0.0: 首次发布 + +## FAQ + +[English > FAQ](./docs/faq-en.md) + +[简体中文 > 常见问题](./docs/faq-cn.md) + +## Requirements + +NodeJS >= 16.15.0 + +### Local Development + +```shell +# install nodejs >= 16.15.0 +npm i -g pnpm +pnpm i + +# run server +cd packages/gpt-runner-web && pnpm dev:server + +# open a new terminal and run client +cd packages/gpt-runner-web && pnpm dev:client +``` + +Now you can visit `http://localhost:3006` to see the result. + +## Donation + +[Buy Me a Coffee](https://www.buymeacoffee.com/jinmingyang) + +## Acknowledgement + +GPT-Runner is made possible thanks to the inspirations from the following projects: + +> in alphabet order + +- [Docusaurus](https://github.com/facebook/docusaurus) +- [LangchainJs](https://github.com/hwchase17/langchainjs) +- [UnoCss](https://github.com/unocss/unocss) +- [VSCode-Webview-Ui-Toolkit](https://github.com/microsoft/vscode-webview-ui-toolkit) + +### Sponsor + +no... + +### Contributor + +[Contributors](https://github.com/nicepkg/gpt-runner/graphs/contributors) + +## LICENSE + +[MIT](./LICENSE) License © 2023-PRESENT [Jinming Yang](https://github.com/2214962083) diff --git a/package.json b/package.json index 32caead..80d01bc 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "@antfu/eslint-config": "^0.38.6", "@nicepkg/gpt-runner": "workspace:*", "@nicepkg/gpt-runner-cli": "workspace:*", - "@nicepkg/gpt-runner-config": "workspace:*", "@nicepkg/gpt-runner-core": "workspace:*", "@nicepkg/gpt-runner-shared": "workspace:*", "@types/fs-extra": "^11.0.1", @@ -76,4 +75,4 @@ "eslint --cache --fix" ] } -} +} \ No newline at end of file diff --git a/packages/gpt-runner-cli/README.md b/packages/gpt-runner-cli/README.md index 75996b7..8932f00 100644 --- a/packages/gpt-runner-cli/README.md +++ b/packages/gpt-runner-cli/README.md @@ -1,47 +1,86 @@ -# GPT Runner CLI +# GPT-Runner CLI -[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nicepkg/gpt-runner/blob/main/packages/gpt-runner-cli/LICENSE) -[![GitHub stars](https://img.shields.io/github/stars/nicepkg/gpt-runner.svg)](https://github.com/nicepkg/gpt-runner/stargazers) - -The GPT Runner CLI is a command-line interface tool that allows developers to run AI-powered chat prompts in their projects. It provides a web interface and IDE extension to retrieve and create chat prompts based on AI robot presets. - -## Features - -- Retrieve AI robot preset chat prompts from `.gpt.md` files in your project -- Create new chat prompts based on the existing presets -- Included in Git version management for collaboration within your team +GPT-Runner CLI (Command Line Interface) is a powerful tool that makes it easy for developers to manage AI presets and interact with their code files. It provides a simple way to increase team collaboration and improve development efficiency. ## Installation -To install the GPT Runner CLI, you need to have [Node.js](https://nodejs.org) installed on your machine. Then, you can install it globally using [npm](https://www.npmjs.com/package/@nicepkg/gpt-runner-cli) or [yarn](https://yarnpkg.com/package/@nicepkg/gpt-runner-cli): +To install GPT-Runner CLI, make sure you have Node.js (version 16.15.0 or higher) installed on your system. You can then install the CLI globally using the following command: -```shell -# Using npm -$ npm install -g @nicepkg/gpt-runner-cli - -# Using yarn -$ yarn global add @nicepkg/gpt-runner-cli +```sh +npm install -g gptr ``` ## Usage -Once installed, you can use the `gptr` command to start the GPT Runner CLI: +Once installed, you can go to your project path and run the `gptr` command to start the GPT-Runner server and open the web interface in your default browser. -```shell -$ gptr [...rootPaths] -p [port number] [--no-open] [--debug] +```sh +cd +gptr ``` -- `rootPaths` (optional): Specify the root path(s) where the `.gpt.md` files are located. Multiple paths can be provided. -- `port` (optional): Specify the server port number. Default: 3003. -- `--no-open` (optional): Do not open the web interface in the browser automatically. -- `--debug` (optional): Enable debug mode. +### Command Overview + +Here is an overview of the available commands and their descriptions: + +- `gptr` (default): Starts the GPT-Runner server and opens the web interface in your default browser. You can also specify additional options to customize the behavior (see [command options](#command-options) below). + +### Command Options + +You can customize the behavior of the `gptr` command using the following options: + +- `-p, --port [port number]`: Specify the server port (default: 3003). +- `-c, --config [file]`: Provide a path to your custom configuration file. +- `--share`: Share the GPT-Runner web interface temporarily using a Gradio link. +- `--no-open`: Do not open the web interface in your browser when the server starts. +- `--debug`: Enable debug mode for detailed logging. + +## Examples + +1. Start GPT-Runner with default settings: + + ```sh + gptr + ``` + +2. Start GPT-Runner on a specific port: + + ```sh + gptr --port 4000 + ``` + +3. Start GPT-Runner with a custom configuration file: + + ```sh + gptr --config ./scripts/gptr.config.json + ``` + +4. Share the GPT-Runner web interface using a temporary Gradio link: + + ```sh + gptr --share + ``` + +5. Start GPT-Runner without opening the web interface in your browser: + + ```sh + gptr --no-open + ``` + +6. Start GPT-Runner in debug mode: + + ```sh + gptr --debug + ``` + +## Troubleshooting + +If you encounter any issues or need more information on GPT-Runner CLI, refer to the [FAQ](https://github.com/nicepkg/gpt-runner/blob/main/docs/faq-en.md) sections in the project documentation. If you can't find a solution there, feel free to open an [issue](https://github.com/nicepkg/gpt-runner/issues) on the project's GitHub page. ## Contributing -Contributions to the GPT Runner CLI are welcome! Feel free to open issues and submit pull requests on the [GitHub repository](https://github.com/nicepkg/gpt-runner). - -When contributing, please make sure to follow the [code of conduct](https://github.com/nicepkg/gpt-runner/blob/main/CODE_OF_CONDUCT.md). +Contributions to GPT-Runner CLI are welcome! Check out the [contributing guideline](https://github.com/nicepkg/gpt-runner/blob/main/CONTRIBUTING.md) to get started. ## License -This project is licensed under the MIT License. See the [LICENSE](https://github.com/nicepkg/gpt-runner/blob/main/packages/gpt-runner-cli/LICENSE) file for details. +GPT-Runner CLI is provided under the [MIT License](./LICENSE). diff --git a/packages/gpt-runner-config/build.config.ts b/packages/gpt-runner-config/build.config.ts deleted file mode 100644 index a92ce0f..0000000 --- a/packages/gpt-runner-config/build.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { defineBuildConfig } from 'unbuild' - -export default defineBuildConfig({ - entries: [ - { - builder: 'rollup', - input: 'src/index', - name: 'index', - }, - ], - clean: true, - declaration: true, - rollup: { - emitCJS: true, - }, -}) diff --git a/packages/gpt-runner-config/package.json b/packages/gpt-runner-config/package.json deleted file mode 100644 index 2bd87b7..0000000 --- a/packages/gpt-runner-config/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@nicepkg/gpt-runner-config", - "version": "0.1.3", - "description": "Config loader for GPT Runner", - "author": "Jinming Yang <2214962083@qq.com>", - "license": "MIT", - "funding": "https://github.com/sponsors/2214962083", - "homepage": "https://github.com/nicepkg/gpt-runner/tree/main/packages/gpt-runner-config#readme", - "repository": { - "type": "git", - "url": "https://github.com/nicepkg/gpt-runner", - "directory": "packages/gpt-runner-config" - }, - "bugs": { - "url": "https://github.com/nicepkg/gpt-runner/issues" - }, - "keywords": [ - "gpt-runner", - "chatgpt", - "prompt", - "ai" - ], - "sideEffects": false, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.cjs", - "import": "./dist/index.mjs" - } - }, - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "files": [ - "dist/", - "LICENSE", - "*.md" - ], - "engines": { - "node": ">=16.15.0" - }, - "scripts": { - "build": "unbuild", - "stub": "unbuild --stub" - }, - "dependencies": { - "@nicepkg/gpt-runner-core": "workspace:*", - "@nicepkg/gpt-runner-shared": "workspace:*", - "unconfig": "^0.3.9" - } -} diff --git a/packages/gpt-runner-config/src/index.ts b/packages/gpt-runner-config/src/index.ts deleted file mode 100644 index ba7fe27..0000000 --- a/packages/gpt-runner-config/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { loadUserConfig } from '@nicepkg/gpt-runner-core' -export type { LoadConfigResult, LoadConfigSource, IUserConfig } from '@nicepkg/gpt-runner-core' diff --git a/packages/gpt-runner-config/tsconfig.json b/packages/gpt-runner-config/tsconfig.json deleted file mode 100644 index 4082f16..0000000 --- a/packages/gpt-runner-config/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/packages/gpt-runner-core/LICENSE b/packages/gpt-runner-core/LICENSE new file mode 100644 index 0000000..95ade51 --- /dev/null +++ b/packages/gpt-runner-core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023-PRESENT Jinming Yang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/gpt-runner-vscode/LICENSE b/packages/gpt-runner-vscode/LICENSE new file mode 100644 index 0000000..95ade51 --- /dev/null +++ b/packages/gpt-runner-vscode/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023-PRESENT Jinming Yang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/gpt-runner/LICENSE b/packages/gpt-runner/LICENSE new file mode 100644 index 0000000..95ade51 --- /dev/null +++ b/packages/gpt-runner/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023-PRESENT Jinming Yang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/gpt-runner/README.md b/packages/gpt-runner/README.md new file mode 100644 index 0000000..62b45c0 --- /dev/null +++ b/packages/gpt-runner/README.md @@ -0,0 +1,61 @@ +# GPT-Runner + +The GPT-Runner package is a powerful and versatile AI-driven tool designed to help developers improve their workflow by integrating AI-powered robot presets into their development environment. This package is a part of the larger GPT-Runner project and serves as the core engine behind its functioning. + +## Overview + +GPT-Runner enables developers to create and manage AI-powered robot presets through the use of `xxx.gpt.md` files within their projects. These files contain customizable parameters such as system prompts, user prompts, model names, and temperature, allowing developers to fine-tune the AI settings to suit their specific needs. + +By integrating GPT-Runner into their development workflow, developers can enjoy features such as: + +- AI Robot Preset-based Chats for efficient team communication and collaboration. +- Seamless integration with any IDE through the GPT-Runner CLI and IDE extensions. +- Customizable AI parameters for enhanced control and adaptability. + +## Installation + +To install and utilize the GPT-Runner package in your project, follow these steps: + +1. Ensure that you have Node.js (version 16.15.0 or higher) installed on your system. +2. Add the GPT-Runner package as a dependency in your project by running the following command: + + ```sh + npm install @nicepkg/gpt-runner + ``` + +3. Import the GPT-Runner package in your project and utilize its features according to your requirements. + +## Usage + +Define your project configuration using the `defineConfig` function, providing it with a configuration object containing your project's preferences: + +```javascript +import { defineConfig } from '@nicepkg/gpt-runner'; + +const config = defineConfig({ + rootPath: 'path/to/your/project/root', + model: { + type: 'openai', + modelName: 'gpt-4', + secrets: { + apiKey: 'your_api_key' + } + } +}); +``` + +### Other Functions and Utilities + +GPT-Runner exposes various other functions and utilities from the shared `@nicepkg/gpt-runner-shared` package, which you can utilize in your project as required. Explore the GPT-Runner package source code and documentation for more information on the available functions and their use cases. + +## Troubleshooting + +If you encounter any issues or need more information on the GPT-Runner package, refer to the [FAQ](https://github.com/nicepkg/gpt-runner/blob/main/docs/faq-en.md) sections in the project documentation. If you can't find a solution there, feel free to open an [issue](https://github.com/nicepkg/gpt-runner/issues) on the project's GitHub page. + +## Contributing + +Contributions to the GPT-Runner package are welcome! Check out the [contributing guideline](https://github.com/nicepkg/gpt-runner/blob/main/CONTRIBUTING.md) to get started. + +## License + +The GPT-Runner package is provided under the [MIT License](https://github.com/nicepkg/gpt-runner/blob/main/LICENSE). diff --git a/playground/scripts/gpt/best.gpt.md b/playground/scripts/gpt/best.gpt.md index a3fdb63..45ab36d 100644 --- a/playground/scripts/gpt/best.gpt.md +++ b/playground/scripts/gpt/best.gpt.md @@ -3,7 +3,7 @@ "title": "common/", "model": { "type": "openai", - "modelName": "gpt-3.5-turbo-16k", + "modelName": "gpt-4", "temperature": 0.5 } } diff --git a/playground/scripts/gpt/gpt-runner.gpt.md b/playground/scripts/gpt/gpt-runner.gpt.md index a52cb13..3cf5435 100644 --- a/playground/scripts/gpt/gpt-runner.gpt.md +++ b/playground/scripts/gpt/gpt-runner.gpt.md @@ -1,16 +1,23 @@ ```json { - "title": "common/gpt runner" + "title": "common/gpt runner", + "model": { + "modelName": "gpt-4" + } } ``` # System Prompt -#01 user is writing an open source project, which helps developers introduce llm ai workflow into team work, so as to help developers improve efficiency. +#01 user is writing an open source project, which helps developers introduce llm ai workflow into team work, so as to help developers improve efficiency. The user's project is called GPT-Runner. -#02 The main function of #02 user's open source project is to provide web interface and ide extension to retrieve all xxx.gpt.md files in the developer project, these files are ai robot presets. +#02 This project of the user allows the developer to check the file and then raise the demand with AI, which will greatly improve the development efficiency. Imagine a developer as a product manager. -#03 Developers can create chat based on these ai robot preset xxx.gpt.md files, these files will be included in git version management, which will greatly prompt the team's collaboration ability +#03 The main function of user's open source project is to provide cli to run web interface and ide extension to retrieve all xxx.gpt.md files in the developer project, these files are ai robot presets. So developers using any ide can enjoy this ai workflow. + +#04 Developers can create chat based on these ai robot preset xxx.gpt.md files, these files will be included in git version management, which will greatly prompt the team's collaboration ability + +#05 The .gpt.md file can not only specify system prompt and user prompt, but also can specify many ai parameters, such as model name, temperature, etc. A .gpt.md file can bring great value with the maintenance and improvement of the team. Imagine that unit-test.gpt.md is used to write unit tests, component.gpt.md file is used to write components, and interface-to-mock.gpt.md file is used to generate fake data based on interface types. # User Prompt diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9cb2848..993f2f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,9 +16,6 @@ importers: '@nicepkg/gpt-runner-cli': specifier: workspace:* version: link:packages/gpt-runner-cli - '@nicepkg/gpt-runner-config': - specifier: workspace:* - version: link:packages/gpt-runner-config '@nicepkg/gpt-runner-core': specifier: workspace:* version: link:packages/gpt-runner-core @@ -285,18 +282,6 @@ importers: specifier: ^1.0.4 version: 1.0.4 - packages/gpt-runner-config: - dependencies: - '@nicepkg/gpt-runner-core': - specifier: workspace:* - version: link:../gpt-runner-core - '@nicepkg/gpt-runner-shared': - specifier: workspace:* - version: link:../gpt-runner-shared - unconfig: - specifier: ^0.3.9 - version: 0.3.9 - packages/gpt-runner-core: dependencies: '@nicepkg/gpt-runner-shared': diff --git a/scripts/copy-files.ts b/scripts/copy-files.ts index a7402cd..61a12b0 100644 --- a/scripts/copy-files.ts +++ b/scripts/copy-files.ts @@ -3,9 +3,9 @@ import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' // relative to scripts directory -const destinations = [ - ['../LICENSE', '../packages/gpt-runner-vscode/LICENSE'], - ['../README.md', '../packages/gpt-runner-web/README.md'], +const destinations: string[][] = [ + // ['../LICENSE', '../packages/gpt-runner-vscode/LICENSE'], + // ['../README.md', '../packages/gpt-runner-web/README.md'], ] const _filename = fileURLToPath(import.meta.url) diff --git a/tsconfig.json b/tsconfig.json index bb85f9a..353f9df 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,6 @@ "paths": { "@nicepkg/gpt-runner": ["./packages/gpt-runner/src/index.ts"], "@nicepkg/gpt-runner-cli": ["./packages/gpt-runner-cli/src/index.ts"], - "@nicepkg/gpt-runner-config": ["./packages/gpt-runner-config/src/index.ts"], "@nicepkg/gpt-runner-core": ["./packages/gpt-runner-core/src/index.ts"], "@nicepkg/gpt-runner-web/client": ["./packages/gpt-runner-web/client/src/index"], "@nicepkg/gpt-runner-web/server": ["./packages/gpt-runner-web/server/src/index"],