{"id":24956859,"url":"https://github.com/andrewstuart/openai","last_synced_at":"2025-04-10T19:05:05.320Z","repository":{"id":99433333,"uuid":"608484465","full_name":"andrewstuart/openai","owner":"andrewstuart","description":"A go client and cli for the openai APIs, focused on developer friendliness and convenience atop the basic building blocks for the OpenAI apis","archived":false,"fork":false,"pushed_at":"2024-05-20T23:28:31.000Z","size":146,"stargazers_count":64,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T16:46:18.286Z","etag":null,"topics":["chatgpt","cli","client","dalle2","go","golang","gpt3","openai","whisper"],"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/andrewstuart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-02T05:30:09.000Z","updated_at":"2025-03-15T23:21:42.000Z","dependencies_parsed_at":"2023-11-07T17:27:56.555Z","dependency_job_id":"52907824-e1e2-4321-9822-e81fed36b0dd","html_url":"https://github.com/andrewstuart/openai","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fopenai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fopenai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fopenai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fopenai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewstuart","download_url":"https://codeload.github.com/andrewstuart/openai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279196,"owners_count":21077406,"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":["chatgpt","cli","client","dalle2","go","golang","gpt3","openai","whisper"],"created_at":"2025-02-03T06:41:26.258Z","updated_at":"2025-04-10T19:05:05.296Z","avatar_url":"https://github.com/andrewstuart.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A go wrapper for OpenAI Platform APIs\n\nThis is a wrapper around OpenAI APIs that means to simplify the creation of\ntooling that interacts with OpenAI and other Go code in fun, novel ways. There\nis also a generic fun cli in `cmd/openai` that exposes library code to the CLI\nas well as providing some usage examples for the library.\n\nIf you need a token, head over to https://platform.openai.com/account/api-keys,\nand sign up if you need to. If you haven't signed up already, you usually get\n$20ish in credit, which should get you pretty far.\n\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/andrewstuart/openai.svg)](https://pkg.go.dev/github.com/andrewstuart/openai)\n![Go](https://github.com/andrewstuart/openai/actions/workflows/go.yml/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/andrewstuart/openai)](https://goreportcard.com/report/github.com/andrewstuart/openai)\n\n\nYou may also notice that there are plenty of pointers for optional fields in\nRequest structs, but none of the common helper funcs to return pointers. I\ncreated one module to rule them all (there may be others, but it's 3 lines and I\nhonestly didn't want to spend the time looking). I suggest\n[github.com/andrewstuart/p](https://github.com/andrewstuart/p) for your \"pointer to anything, even a literal or\nconst\" needs.\n\n```bash\ngo install github.com/andrewstuart/openai/cmd/openai@latest\n\necho \"token: $MY_TOKEN\" \u003e\u003e $HOME/.config/openai.yaml\n# Or export TOKEN in your environment variables.\n# add org: \u003cyour org id\u003e if you are a member of multiple organizations.\n\nopenai chat --personality \"Lady Gaga\"\nopenai chat --prompt \"You answer in the style of a super chill surfer from southern california.\"\nopenai image \"Marvin the Paranoid Android giving a speech.\" -f marvin.jpg\nopenai variations -n 5 marvin-001.jpg\nopenai complete 'A description of a painting of a perfect day' | openai image -f self.jpg -\n\nopenai files upload *json # must be linejson format\nopenai files list\n```\n\nFor the best current go examples, see the [CLI files](cmd/openai/cmd). \n\nCurrent support:\n\n- [x] Chat\n- [x] Completion (code, text, etc)\n- [x] Edit\n- [x] Images\n- [x] Image variations\n- [x] Audio transcription\n- [x] Upload/manage Files (for fine tuning)\n  - [ ] Convenience methods for jsonlines\n- [ ] Fine tune models\n- [x] Moderations (check for OpenAI content policy violations)\n- [x] List models\n- [ ] More soon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewstuart%2Fopenai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewstuart%2Fopenai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewstuart%2Fopenai/lists"}