{"id":14960801,"url":"https://github.com/tylearymf/unigpt","last_synced_at":"2026-02-27T20:03:17.749Z","repository":{"id":146647018,"uuid":"618067362","full_name":"tylearymf/UniGPT","owner":"tylearymf","description":"在Unity编辑器中使用ChatGPT、BingChat、GoogleBard来生成并执行代码。(Use ChatGPT, BingChat and GoogleBard to generate and execute code within the Unity editor.)","archived":false,"fork":false,"pushed_at":"2023-04-20T15:01:05.000Z","size":17840,"stargazers_count":131,"open_issues_count":1,"forks_count":29,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-10T10:22:34.553Z","etag":null,"topics":["bard","bingai","bingchat","binggpt","chatgpt","google-bard","openai","unity","unity-editor","unity-gpt"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tylearymf.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-03-23T17:24:30.000Z","updated_at":"2024-09-13T02:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"5da069f4-e0fc-49d7-be18-f7a1bebd4c4a","html_url":"https://github.com/tylearymf/UniGPT","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"bf149fe45e794a966da92aed32b7dff21b44923a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylearymf%2FUniGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylearymf%2FUniGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylearymf%2FUniGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylearymf%2FUniGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylearymf","download_url":"https://codeload.github.com/tylearymf/UniGPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868059,"owners_count":16555878,"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":["bard","bingai","bingchat","binggpt","chatgpt","google-bard","openai","unity","unity-editor","unity-gpt"],"created_at":"2024-09-24T13:23:02.603Z","updated_at":"2025-10-24T19:30:22.943Z","avatar_url":"https://github.com/tylearymf.png","language":"C#","readme":"# UniGPT\t[English Doc](https://github.com/tylearymf/UniGPT/blob/main/README_EN.md)\n\n**在Unity编辑器中使用ChatGPT、NewBing、GoogleBard来生成并执行代码。**\n\n**输出文本支持流式传输**\n\n---\n\nChatGPT\n\n![chatgpt](Screenshots/chatgpt.gif)\n\nNew Bing\n\n![binggpt](Screenshots/binggpt.gif)\n\nGoogle Bard\n\n![bard](Screenshots/bard.gif)\n\n\n\n### 安装要求\n\n**Unity版本 \u003e= 2019.3**\n\n### 初始化环境\n\n1. 进入Unity工程，等待Python环境初始化完成，然后 Edit -\u003e Project Settings -\u003e Python Scripting -\u003e \n\n   Launch Terminal (打开命令行工具)\n\n   ![image-20230324020733689](Screenshots/image-20230324020733689.png)\n\n2. 按顺序执行以下命令\n\n   ```bash\n   python -m pip install --upgrade pip\n   python -m pip install revChatGPT\n   python -m pip install EdgeGPT\n   python -m pip install GoogleBard\n   ```\n\n3. 按照下面的教程配置AI\n\n### 使用教程\n\n#### 配置 ChatGPT\n\n1. 获取 ChatGPT 的 api_key，具体参考：https://platform.openai.com/account/api-keys\n2. 编辑该Json配置：Assets/IntegrationGPT/Config~/chat_gpt_config.json\n3. 国内的可以参考这里部署个腾讯云函数：[openai-api-proxy](https://github.com/easychen/openai-api-proxy/blob/master/FUNC.md)，然后替换掉配置中的 api_url 即可\n\n```json\n{\n  # 将获取到的 api_key 替换掉下面的\n  \"api_key\": \"sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n  # chatgpt使用的模型, 如果你是Plus用户, 可以修改模型为 gpt-4\n  \"model\": \"gpt-3.5-turbo\",\n  # 代理设置，如果不需要则删除，在国内的必须要设置，否则无法访问openai的api\n  \"proxy\": \"http://127.0.0.1:1080\",\n  # 如果有国内镜像的，可以将api地址填写在这里\n  # 官方API：https://api.openai.com/v1/chat/completions\n  \"api_url\": \"\",\n  # 这个是ChatGPT的提示语，可以根据需要增删\n  \"prompt\": {\n    \"聊天\": \"\",\n\t\"生成并执行代码\": \"我想让你在Unity里面实现一个需求, 然后你给我回复代码, 你需要将实现逻辑写在TemplateClass中的Test静态方法里面, 我希望我不需要设置任何东西, 只手动调用Test方法后就能得到正确的结果, 我希望你只回复代码, 而不是其他任何内容, 不要注释.\\n我的第一个需求是\\n\"\n  }\n}\n```\n\n#### 配置 New Bing\n\n1. 首先确保你已经加入了 New Bing，具体参考：https://github.com/acheong08/EdgeGPT#checking-access-required\n\n2. 然后获取 cookies，具体参考：https://github.com/acheong08/EdgeGPT#getting-authentication-required\n\n3. 将获取的 cookies 拷贝到 Assets/IntegrationGPT/Config~/new_bing_cookies.json 中\n\n4. 编辑该Json配置：Assets/IntegrationGPT/Config~/new_bing_config.json\n\n   ```json\n   {\n     # 对话样式\n     # 更具创造力:creative 平衡:balanced 精确:precise\n     \"style\": \"precise\",\n     # 代理设置，如果不需要则删除，在国内的必须要设置，否则无法访问bing的api\n     \"proxy\": \"http://127.0.0.1:1080\",\n     # 如果有国内镜像的，可以将api地址填写在这里\n     # 官方API：https://edgeservices.bing.com/edgesvc/turing/conversation/create\n     \"api_url\": \"\",\n     # 这个是Bing的提示语，可以根据需要增删\n     \"prompts\": {\n       \"聊天\": \"\",\n       \"生成并执行代码\": \"我想让你在Unity里面实现一个需求, 然后你给我回复代码, 你需要将实现逻辑写在TemplateClass中的Test静态方法里面, 并正确引用命名空间, 我希望我不需要设置任何东西, 只手动调用Test方法后就能得到正确的结果,我希望你只回复代码, 而不是其他任何内容, 不要注释.\\n我的第一个需求是\\n\"\n     }\n   }\n   ```\n\n#### 配置 Google Bard\n\n1. 首先确保你已经加入了 Google Bard\n\n2. 然后获取session，具体参考：https://github.com/acheong08/Bard#authentication\n\n3. 编辑该Json配置：Assets/IntegrationGPT/Config~/google_bard_config.json\n\n   ```json\n   {\n       # google bard 的 session\n       \"session\": \"\",\n        # 代理设置，如果不需要则删除，在国内的必须要设置，否则无法访问google的api\n       \"proxy\": \"\",\n       # 这个是Google Bard的提示语，可以根据需要增删\n       \"prompts\":{\n           \"Chat\": \"\"\n       }\n   }\n   ```\n\n   \n\n\n\n### 引用\n- [ChatGPT](https://github.com/acheong08/ChatGPT)\n- [EdgeGPT](https://github.com/acheong08/EdgeGPT)\n- [GoogleBard](https://github.com/acheong08/Bard)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylearymf%2Funigpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylearymf%2Funigpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylearymf%2Funigpt/lists"}