{"id":25144671,"url":"https://github.com/fzdwx/jacksapi","last_synced_at":"2026-04-30T01:34:50.283Z","repository":{"id":170616758,"uuid":"646796372","full_name":"fzdwx/jacksapi","owner":"fzdwx","description":"Jack's ChatGpt API client, simulate the official response of ChatGPT","archived":false,"fork":false,"pushed_at":"2023-10-27T12:38:07.000Z","size":425,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T06:14:23.235Z","etag":null,"topics":["chatgpt","command","openai","simulate"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fzdwx.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}},"created_at":"2023-05-29T11:09:14.000Z","updated_at":"2023-05-31T08:02:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"540a67ba-c6da-499d-92bd-fc4a578b00d0","html_url":"https://github.com/fzdwx/jacksapi","commit_stats":null,"previous_names":["fzdwx/jacksapi"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fzdwx/jacksapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fjacksapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fjacksapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fjacksapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fjacksapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fzdwx","download_url":"https://codeload.github.com/fzdwx/jacksapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fjacksapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32451377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"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":["chatgpt","command","openai","simulate"],"created_at":"2025-02-08T19:47:11.391Z","updated_at":"2026-04-30T01:34:50.257Z","avatar_url":"https://github.com/fzdwx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jack's ChatGpt api client\n\nIt's a simple client for the https://chat-one.emmmm.dev/ .\n\n![](.github/ask.gif)\n\n## Usage\n\n### lib\n\n```shell\ngo get github.com/fzdwx/jacksapi@latest\n```\n\ncode:\n\n```go\nvar (\n    content    = strings.Join(os.Args[1:], \" \")\n    accessCode = os.Getenv(\"EMM_API_KEY\")\n)\n\njacksapi.NewClient(accessCode).\n    ChatStream(\n        []jacksapi.ChatMessage{\n            {Role: \"user\", Content: content},\n        }).\n    DoWithCallback(jacksapi.Output)\n```\n\n\n### cli\n\n```shell\ngo install github.com/fzdwx/jacksapi/cmd/ask@latest\n```\n\ncommand:\n\n```shell\n# ask chatgpt how are you\nask how are you\n\n# start api server\nask server 1333 \ncurl -X POST -H \"Content-Type: application/json\" \\ \n     -d '{\"messages\":[{\"role\":\"user\",\"content\":\"how are you\"}]}' \\\n     http://localhost:1333 \n\n# simulate the API of ChatGPT.\ncurl 'http://localhost:1333/v1/chat/completions' \\\n  -H 'Accept: */*' \\\n  -H 'Connection: keep-alive' \\\n  -H 'Content-Type: application/json' \\\n  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36' \\\n  --data-raw '{\"model\":\"gpt-3.5-turbo\",\"temperature\":0,\"max_tokens\":1000,\"top_p\":1,\"frequency_penalty\":1,\"presence_penalty\":1,\"stream\":true,\"messages\":[{\"role\":\"system\",\"content\":\"你是一个翻译引擎，请翻译给出的文本，只需要翻译不需要解释。当且仅当文本只有一个单词时，请给出单词原始形态（如果有）、单词的语种、对应的音标或转写、所有含义（含词性）、双语示例，至少三条例句，请严格按照下面格式给到翻译结果：\\n                \u003c单词\u003e\\n                [\u003c语种\u003e] · / \u003cPinyin\u003e\\n                [\u003c词性缩写\u003e] \u003c中文含义\u003e]\\n                例句：\\n                \u003c序号\u003e\u003c例句\u003e(例句翻译)\\n                词源：\\n                \u003c词源\u003e\"},{\"role\":\"user\",\"content\":\"好的，我明白了，请给我这个单词。\"},{\"role\":\"user\",\"content\":\"单词是：hello\"}]}' \\\n  --compressed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzdwx%2Fjacksapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffzdwx%2Fjacksapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzdwx%2Fjacksapi/lists"}