Closed dmartinol closed 2 years ago
@dmartinol @RobotSail @cooktheryan I think we can set up a github workflow on this repo that whenever I type /copilot-ops in a comment it runs the cli and creates a PR referencing that comment, and then we can resolve this issue by typing:
/copilot-ops edit README.md -- replace all OPENAI_API_TOKEN with OPENAI_API_KEY
:) https://pakstech.com/blog/gh-actions-issue-comments/ https://github.community/t/how-to-use-the-github-actions-bot/16535/2
ok we have an initial bot, so lets try this:
/copilot-ops edit --file README.md --request "The variable name is described as OPENAI_API_TOKEN in the README.md, but actually it is OPENAI_API_KEY"
["/copilot-ops","edit","--file","README.md","--request","The variable name is described as OPENAI_API_TOKEN in the README.md, but actually it is OPENAI_API_KEY"]
0
num parts: 1
2022/06/08 19:02:29 flags:
2022/06/08 19:02:29 - request : The variable name is described as OPENAI_API_TOKEN in the README.md, but actually it is OPENAI_API_KEY
2022/06/08 19:02:29 - write : false
2022/06/08 19:02:29 - path : .
2022/06/08 19:02:29 - file : [README.md]
2022/06/08 19:02:29 - fileset : []
2022/06/08 19:02:29 - ntokens : 0
2022/06/08 19:02:29 viper: /home/runner/work/copilot-ops/copilot-ops/.copilot-ops.yaml
2022/06/08 19:02:29 viper:
2022/06/08 19:02:29 Filesets: [{Name:examples Files:[examples/*.yaml]} {Name:stock-data Files:[examples/stock-data.yaml]} {Name:cluster-scope-overlays Files:[examples/stale_dev_overlay/*.yaml]} {Name:app1 Files:[examples/app1/*.yaml]}]
2022/06/08 19:02:29 loading files from command line: [README.md]
2022/06/08 19:02:29 LoadFilesFromGlob "README.md" - matches [README.md]
2022/06/08 19:02:29 filemap: len 1
2022/06/08 19:02:29 - tag: "README.md": path: "README.md" [# copilot-ops `copilot-ops` i ...] len 6170
2022/06/08 19:02:29 decoded input: "# @README.md\n# copilot-ops\n\n`copilot-ops` is a CLI tool that boosts up any \"devops repo\" to a ninja level of *Artificially Intelligent Ops Repo*.\n\n ..."
2022/06/08 19:02:32 received patch from OpenAI: "# @README.md\n# copilot-ops\n\n`copilot-ops` is a CLI tool that boosts up any \"devops repo\" to a ninja level of *Artificially Intelligent Ops Repo*.\n\n"
2022/06/08 19:02:32 filemap: len 1
2022/06/08 19:02:32 - tag: "README.md": path: "README.md" [# copilot-ops `copilot-ops` i ...] len 6165
2022/06/08 19:02:32
# @README.md
# copilot-ops
`copilot-ops` is a CLI tool that boosts up any "devops repo" to a ninja level of *Artificially Intelligent Ops Repo*.
## Requirements
In order to use `copilot-ops`, you need to have an OpenAI account with access to the GPT-3 Codex model,
and an API key saved as the `OPENAI_API_KEY` environment variable.
## Installation
Installing `copilot-ops` is simple, simply clone this repository and `make build`:
...
The variable name is described as OPENAI_API_TOKEN in the README.md, but actually it is OPENAI_API_KEY.