{"id":22197801,"url":"https://github.com/onmax/oai-createcompletion-githubaction","last_synced_at":"2026-04-29T01:08:22.062Z","repository":{"id":65736200,"uuid":"597208484","full_name":"onmax/oai-createcompletion-githubaction","owner":"onmax","description":"Use the OpenAI CreateCompletion feature to generate completions for text prompts to add AI-powered text generation capabilities to your workflow.","archived":false,"fork":false,"pushed_at":"2023-02-12T14:58:38.000Z","size":1007,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-11T01:41:48.359Z","etag":null,"topics":["github-action","openai","openai-api"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/openai-createcompletion","language":"TypeScript","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/onmax.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-03T21:45:08.000Z","updated_at":"2025-02-01T20:38:57.000Z","dependencies_parsed_at":"2023-02-19T16:00:38.834Z","dependency_job_id":null,"html_url":"https://github.com/onmax/oai-createcompletion-githubaction","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"ef0f6cd3da8beb65d2ba341eff1a6d1481f76b38"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/onmax/oai-createcompletion-githubaction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Foai-createcompletion-githubaction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Foai-createcompletion-githubaction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Foai-createcompletion-githubaction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Foai-createcompletion-githubaction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onmax","download_url":"https://codeload.github.com/onmax/oai-createcompletion-githubaction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Foai-createcompletion-githubaction/sbom","scorecard":{"id":707541,"data":{"date":"2025-08-11","repo":{"name":"github.com/onmax/oai-createcompletion-githubaction","commit":"ef0f6cd3da8beb65d2ba341eff1a6d1481f76b38"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/check-dist.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-dist.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/onmax/oai-createcompletion-githubaction/check-dist.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-dist.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/onmax/oai-createcompletion-githubaction/check-dist.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-dist.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/onmax/oai-createcompletion-githubaction/check-dist.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/onmax/oai-createcompletion-githubaction/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/onmax/oai-createcompletion-githubaction/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:15","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T07:07:35.109Z","repository_id":65736200,"created_at":"2025-08-22T07:07:35.110Z","updated_at":"2025-08-22T07:07:35.110Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"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":["github-action","openai","openai-api"],"created_at":"2024-12-02T14:23:51.340Z","updated_at":"2026-04-29T01:08:22.027Z","avatar_url":"https://github.com/onmax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/onmax/oai-createcompletion-githubaction/actions\"\u003e\u003cimg alt=\"oai-createcompletion-githubaction status\" src=\"https://github.com/onmax/oai-createcompletion-githubaction/actions/workflows/test.yml/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# OpenAI CreateCompletion - GitHub Action\n\nUse the OpenAI CreateCompletion feature to generate completions for text prompts to add AI-powered text generation capabilities to your workflow.\n\n![Issue Form Parser](./oai-createcompletion-githubaction-cover.png)\n\n---\n\n## Description\n\nThis Action provides an easy and convenient way to use the OpenAI CreateCompletion feature in your GitHub workflows. You can create completions for text prompts using OpenAI's state-of-the-art language generation models. The action can be easily configured to use the OpenAI model of your choice and customised with parameters such as temperature and maximum number of tokens generated. You can learn more about the CreateCompletion feature [here](https://beta.openai.com/docs/api-reference/completions/create).\n\n## Parameters\n\n| Name | Required | Description | Default | \n| ------------- | ------------- | ------------- | ------------- |\n| `model` | `true` | Model to use | - |\n| `prompt` | `true` | Prompt for the model | - |\n| `max_tokens` | `false` | Maximum number of tokens to generate | 12 |\n| `temperature` | `false` | Temperature for the model | 0.4 |\n| `openai_api_key` | `true` | OpenAI API key | - |\n| `openai_org_id` | `false` | OpenAI organization ID | - |\n\n## Usage\n\nFirst, you need to create an Open AI account and get your API keys [here](https://platform.openai.com/account/api-keys). Then, save your keys as secrets in your repository going to `Settings \u003e Secrets \u003e Actions`. You can read more about secrets [here](https://docs.github.com/en/actions/reference/encrypted-secrets).\n\nFinally, you can use the action in your workflow:\n\n```yaml\nsteps:\n  - name: OpenAI CreateCompletion\n    uses: onmax/oai-createcompletion-githubaction@v1.0\n    id: openai\n    with:\n      model: davinci # or curie, babbage, ada. Or any other model documented in the openai docs\n      prompt: \"This is a test\" # the prompt to generate the completion\n      max_tokens: 12 # the maximum number of tokens to generate. Optional\n      temperature: 0.4 # the temperature for the model. Optional\n      openai_api_key: ${{ secrets.OPENAI_API_KEY }} # your openai api key\n      openai_org_id: ${{ secrets.OPENAI_ORG_ID }} # your openai organization id. Optional\n\n  # Examples on how to use the output\n  - name: Show response from OpenAI CreateCompletion\n    run: |\n      # Using the character `'` to prevent all characters enclosed within\n      # them from being treated as special characters (e.g. $ or `)\n      echo '${{ steps.openai.outputs.response }}'\n\n      # Show texts -\u003e Array of strings\n      echo '${{ fromJson(steps.openai.outputs.response).texts }}'\n```\n\n## ⚠️ Limitations\n\n- The action only supports the `CreateCompletion` endpoint. If you need to use other endpoints. PR are welcome!\n\n## Example\n\nUsing the following parameters\n\n| Name | Value |\n| ------------- | ------------- |\n| model | `davinci` |\n| prompt | `\"This is a test\"` |\n| max_tokens | `12` |\n| temperature | `0.4` |\n| openai_api_key | `${{ secrets.OPENAI_API_KEY }}` |\n\nWill return:\n\n```json\n{\n  \"raw\": {\n    \"id\": \"cmpl-xxxxxxxxxxxxxxxxxxxxxxxx\",\n    \"object\": \"text_completion\",\n    \"created\": 1675557848,\n    \"model\": \"text-davinci-003\",\n    \"choices\": [\n      {\n        \"text\": \"\\n\\nThis is indeed a test\",\n        \"index\": 0,\n        \"logprobs\": null,\n        \"finish_reason\": \"length\"\n      }\n    ],\n    \"usage\": {\n      \"prompt_tokens\": 5,\n      \"completion_tokens\": 7,\n      \"total_tokens\": 12\n    }\n  },\n  \"texts\": \"\\n\\nThis is indeed a test\"\n}\n```\n\nSee the [example workflow](./.github/workflows/test.yml) for more details on how to use the action and the [output](https://github.com/onmax/oai-createcompletion-githubaction/actions/runs/4110827051/jobs/7094012603#step:5:4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Foai-createcompletion-githubaction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonmax%2Foai-createcompletion-githubaction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Foai-createcompletion-githubaction/lists"}