{"id":15176756,"url":"https://github.com/lenye/aichat","last_synced_at":"2026-03-01T11:04:34.546Z","repository":{"id":171870287,"uuid":"627741401","full_name":"lenye/aichat","owner":"lenye","description":"OpenAI GPT API 驱动的人工智能聊天","archived":false,"fork":false,"pushed_at":"2024-04-04T14:07:53.000Z","size":170,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T18:50:28.154Z","etag":null,"topics":["ai","chatbot","chatgpt","openai"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lenye.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-04-14T05:24:06.000Z","updated_at":"2025-02-22T14:57:27.000Z","dependencies_parsed_at":"2024-01-17T04:53:24.134Z","dependency_job_id":"9ba12c93-88d7-4b06-b78e-75bc8e7b718d","html_url":"https://github.com/lenye/aichat","commit_stats":null,"previous_names":["lenye/aichat"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/lenye/aichat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenye%2Faichat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenye%2Faichat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenye%2Faichat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenye%2Faichat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenye","download_url":"https://codeload.github.com/lenye/aichat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenye%2Faichat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29967933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T10:55:55.490Z","status":"ssl_error","status_checked_at":"2026-03-01T10:55:55.175Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","chatbot","chatgpt","openai"],"created_at":"2024-09-27T13:41:47.599Z","updated_at":"2026-03-01T11:04:34.531Z","avatar_url":"https://github.com/lenye.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aichat\n\n`aichat`是 OpenAI GPT API 驱动的人工智能聊天，`aichat`: 获得即时答案，寻找创意灵感，并学习新东西。\n\n```shell\n$ ./aichat -h\n\nUsage:\n  aichat [flags]\n\nFlags:\n  -h, --help                         help for aichat\n      --log_format string            log message encode format: text, json (default \"text\")\n      --log_level string             log message level: debug, info, warn, error (default \"info\")\n      --mode string                  running mode: console, web (default \"console\")\n      --openai_api_base_url string   openai api base url\n      --openai_api_key string        openai api key (required)\n      --openai_api_type string       openai api type: open_ai, azure (default \"OPEN_AI\")\n      --openai_history uint          openai chat message history\n      --openai_max_tokens uint       openai chat message max tokens\n      --openai_model string          openai chat message model (default \"gpt-3.5-turbo\")\n      --openai_proxy string          openai proxy\n      --openai_stream                openai chat message stream mode (default true)\n      --openai_system string         openai chat message system prompt\n  -v, --version                      version for aichat\n      --web_port uint                web server listen port (default 8080)\n```\n\n两种代理说明：\n\n1. --openai_proxy 直接代理示例: http://127.0.0.1:9080 或者 socks5://127.0.0.1:1080\n2. --openai_api_base_url 使用反向代理 https://github.com/lenye/chatgpt_reverse_proxy\n\n### 命令行模式\n\n```shell\n./aichat --openai_api_key=xxx\n---------------------\n\u003e\n```\n\n### web模式\n\n```shell\n./aichat --openai_api_key=xxx --mode=web\ntime=2023-08-07T12:42:20.099+08:00 level=INFO msg=\"http server listening on [::]:8080\"\n```\n\n浏览器访问: http://localhost:8080/chat\n\nweb不支持的参数: --openai_history\n\n## Docker\n\n1. 拉取容器映像\n   ```shell\n   $ docker pull ghcr.io/lenye/aichat\n   ```\n\n1. 开始运行它\n   ```shell\n   $ docker run --rm ghcr.io/lenye/aichat --help\n   ```\n\n1. docker-compose.yml\n   ```yaml\n   services:\n   \n     aichat:\n       image: ghcr.io/lenye/aichat\n       restart: unless-stopped\n       ports:\n         - \"8080:8080\"    \n       volumes:\n         - /etc/localtime:/etc/localtime:ro\n       command:\n         - --mode=web   \n         - --openai_api_key=XXX\n   ```\n\n## 源代码\n\n```shell\n$ git clone https://github.com/lenye/aichat.git\n```\n\n## License\n\n`aichat` is released under the [Apache 2.0 license](https://github.com/lenye/aichat/blob/v0.3.0/LICENSE). ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenye%2Faichat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenye%2Faichat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenye%2Faichat/lists"}