{"id":19228134,"url":"https://github.com/unit-mesh/co-unit","last_synced_at":"2025-06-18T01:37:08.884Z","repository":{"id":187447752,"uuid":"676790133","full_name":"unit-mesh/co-unit","owner":"unit-mesh","description":"CoUnit，一个基于 LLM 的虚拟团队接口人（API），通过向量化文档、知识库、SDK和 API 等，结合 LLM 智能化团队间对接与协作。Merge artificial intelligence seamlessly with team collaboration. Leverage intelligent vectorization to process documents, knowledge bases, SDKs, and APIs, empowering teams to unleash their creativity.","archived":false,"fork":false,"pushed_at":"2024-03-29T07:01:23.000Z","size":16079,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T01:43:57.212Z","etag":null,"topics":["aigc","genai","genai-poc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unit-mesh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-10T02:54:22.000Z","updated_at":"2025-03-05T01:35:59.000Z","dependencies_parsed_at":"2023-08-10T13:02:43.355Z","dependency_job_id":"9da19f23-47b8-480a-a692-4cc0684a0b77","html_url":"https://github.com/unit-mesh/co-unit","commit_stats":null,"previous_names":["unit-mesh/co-unit"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/unit-mesh/co-unit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fco-unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fco-unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fco-unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fco-unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unit-mesh","download_url":"https://codeload.github.com/unit-mesh/co-unit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fco-unit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260469351,"owners_count":23014072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aigc","genai","genai-poc"],"created_at":"2024-11-09T15:26:52.136Z","updated_at":"2025-06-18T01:37:03.873Z","avatar_url":"https://github.com/unit-mesh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCoUnit\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/counit.svg\" width=\"128px\" height=\"128px\" /\u003e\n\u003c/p\u003e\n\n\u003e CoUnit，一个基于 LLM 的虚拟团队接口人（API），通过向量化文档、知识库、SDK和 API 等，结合 LLM 智能化团队间对接与协作。\n\ntodos:\n\n- Semantic search for Team API\n    - [x] ArchGuard API：Code, DatabaseMap, HTTP API\n    - [x] Query for OpenAPI\n    - [ ] Documents\n        - [ ] Markdown\n        - [ ] PDF\n- Transpile / Translate language\n    - [x] Unique language (aka Domain Language) dictionary\n    - [x] Transpile for Code, Datamap, API\n- Prompt strategy\n    - [x] [HyDE](https://github.com/texttron/hyde)\n    - [x] ~~Jieba.rs + StarDict spike~~\n    - [x] Small LLM spike\n\nCoUnit Prompt Strategy\n\n![](docs/counit-prompt-strategy.svg)\n\n## Uses\n\n1. Download CoUnit-Server binary from [https://github.com/unit-mesh/co-unit/releases](https://github.com/unit-mesh/co-unit/releases)\n2. push you `domain language` or config under `domain` directory (support, `.csv` and `.json` format)\n3. Run CoUnit-Server\n\nDomain Language:\n\n| native | english              | abbreviation | description                                                              |\n|--------|----------------------|--------------|--------------------------------------------------------------------------|\n| CoUnit | collaboration unit   | CU           | CoUnit，一个基于 LLM 的虚拟团队接口人（API），通过向量化文档、知识库、SDK和 API 等，结合 LLM 智能化团队间对接与协作。 |\n| 大语言模型  | Large Language Model | LLM          | 大语言模型，是指语言模型的参数量超过 10 亿的语言模型。                                            |\n\n## Use cases\n\n- AutoDev -\u003e code: [counit](https://github.com/unit-mesh/auto-dev/tree/master/src/main/kotlin/cc/unitmesh/devti/counit).\n\n## Development\n\nTech stacks:\n\n- Rust, a language empowering everyone to build reliable and efficient software.\n- Frameworks:\n    - Axum, Ergonomic and modular web framework built with Tokio, Tower, and Hyper\n- Infrastructure:\n    - Qdrant, Vector similarity search engine\n    - Ort, ONNX Runtime is a performance-focused complete scoring engine for Open Neural Network Exchange (ONNX) models.\n    - Tokenizers, Fast State-of-the-Art Tokenizers optimized for Research and Production.\n\nSetup:\n\n1. Install Rust\n2. Clone this repo: `git clone https://github.com/unit-mesh/co-unit`\n3. install Qdrant by Docker:\n\n```bash\ndocker pull qdrant/qdrant\ndocker run -p 6333:6333 -p 6334:6334 \\\n    -e QDRANT__SERVICE__GRPC_PORT=\"6334\" \\\n    qdrant/qdrant\n```\n\n4.Run CoUnit-Server.\n\n### API testing\n\nuse [counit-server.http](counit-server.http) to test API.\n\n## Integration example with ArchGuard and AutoDev\n\nAutoDev: [https://github.com/unit-mesh/auto-dev](https://github.com/unit-mesh/auto-dev)\n\nArchGuard: [https://github.com/archguard/archguard](https://github.com/archguard/archguard)\n\nFull processes:\n\n![Architecture](docs/architecture.svg)\n\n1. Download ArchGuard CLI (scanner_cli-2.0.x-all.jar) from: [https://github.com/archguard/archguard/releases]\n2. Run ArchGuard CLI to upload data to Co-Unit:\n\n```bash\nUsage: runner [OPTIONS]\n\n  scanner cli\n\nOptions:\n  --type [SOURCE_CODE|GIT|DIFF_CHANGES|SCA|RULE|ARCHITECTURE|ESTIMATE|OPENAPI]\n  --system-id TEXT                 system id\n  --server-url TEXT                the base url of the archguard api server\n  --workspace TEXT                 the workspace directory\n  --path TEXT                      the path of target project\n  --output TEXT                    http, csv, json, console\n  --output-dir TEXT                output directory\n  --analyser-spec TEXT             Override the analysers via json.\n  --slot-spec TEXT                 Override the slot via json.\n  --language TEXT                  language: Java, Kotlin, TypeScript, CSharp,\n                                   Python, Golang.\n  --rules TEXT                     rules: webapi, test, sql\n  --features TEXT                  features: apicalls, datamap.\n  --repo-id TEXT                   repository id used for git analysing\n  --branch TEXT                    repository branch\n  --started-at INT                 TIMESTAMP, the start date of the scanned\n                                   commit\n  --since TEXT                     COMMIT ID, the specific revision of the\n                                   baseline\n  --until TEXT                     COMMIT ID, the specific revision of the\n                                   target\n  --depth INT                      INTEGER, the max loop depth\n  --with-function-code             BOOLEAN, whether to include the function\n                                   code\n  -h, --help                       Show this message and exit\n```\n\nFor example:\n\n```bash\njava -jar scanner_cli-2.0.6-all.jar --language=Kotlin --path=your_path_to_code --server-url=http://localhost:8765 --repo-id=\"archguard\" --with-function-code --output=http  --features=apicalls\n```\n\nOpenAPI example:\n\n```bash\njava -jar scanner_cli-2.0.6-all.jar --language=Kotlin --path=your_swagger_3_file --server-url=http://localhost:8765 --repo-id=\"payment\" --output=http --type=OPENAPI \n```\n\n#### ArchGuard APIs:\n\n```http request\n### ArchGuard Code datastrcuture\nPOST http://127.0.0.1:8765/scanner/:systemId/reporting/class-items\n\n### ArchGuard OpenAPI structure\nPOST http://127.0.0.1:8765/scanner/:systemId/reporting/openapi\n\n### ArchGuard Service Datamap\nPOST http://127.0.0.1:8765/scanner/:systemId/reporting/container-services\n\n### ArchGuard Datamap \nPOST http://127.0.0.1:8765/scanner/:systemId/reporting/datamap-relations\n```\n\n## License\n\nThe Co-Unit index is licensed under the Apache 2.0 license based\non [https://github.com/BloopAI/bloop](https://github.com/BloopAI/bloop) . See `LICENSE`\nin [counit-index](./counit-index).\n\nThis code is distributed under the MPL 2.0 license. See `LICENSE` in this directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funit-mesh%2Fco-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funit-mesh%2Fco-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funit-mesh%2Fco-unit/lists"}