Skip to content

Commit 18b7268

Browse files
committed
docs: renamed webui.rst to server.rst, added bot.md to index and updated instructions
1 parent de9844d commit 18b7268

File tree

4 files changed

+38
-26
lines changed

4 files changed

+38
-26
lines changed

.github/workflows/bot.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
issue_comment:
55
types: [created]
66

7-
env:
8-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
9-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
10-
117
# Set permissions on GITHUB_TOKEN
128
# It seems we cannot set `workflows: write`, yet it's needed to allow modifying workflow files
139
#permissions:

docs/bot.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,44 @@ The action has the following inputs:
2323

2424
## Usage
2525

26-
To use the `gptme-bot` composite action in your workflow, include it as a step:
26+
To use the `gptme-bot` composite action in your repo, you need to create a GitHub Actions workflow file that triggers the action in response to comments on issues or pull requests.
27+
28+
Here is an example workflow file that triggers the action in response to comments on issues:
2729

2830
```yaml
31+
name: gptme-bot
32+
2933
on:
3034
issue_comment:
3135
types: [created]
3236

33-
steps:
34-
- name: Run gptme-bot composite action
35-
uses: ./.github/actions/bot-composite
36-
with:
37-
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
38-
github_token: ${{ github.token }}
39-
issue_number: ${{ github.event.issue.number }}
40-
comment_body: ${{ github.event.comment.body }}
41-
comment_id: ${{ github.event.comment.id }}
42-
repo_name: ${{ github.event.repository.name }}
43-
user_name: ${{ github.event.repository.owner.login }}
44-
branch_base: "master"
45-
python_version: '3.11'
46-
is_pr: ${{ github.event.issue.pull_request != null }}
47-
branch_name: ${{ github.event.pull_request.head.ref }}
37+
permissions: write-all
38+
39+
jobs:
40+
run-bot:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v3
45+
46+
- name: run gptme-bot action
47+
uses: ./.github/actions/bot
48+
with:
49+
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
issue_number: ${{ github.event.issue.number }}
52+
comment_body: ${{ github.event.comment.body }}
53+
comment_id: ${{ github.event.comment.id }}
54+
repo_name: ${{ github.event.repository.name }}
55+
user_name: ${{ github.event.repository.owner.login }}
56+
branch_base: ${{ github.event.repository.default_branch }}
57+
is_pr: ${{ github.event.issue.pull_request != null }}
58+
branch_name: ${{ github.event.pull_request.head.ref || format('gptme/bot-changes-{0}', github.run_id) }}
59+
allowlist: "erikbjare"
4860
```
4961
50-
Please note that you need to replace the `uses` path with the correct path to your `bot-composite.yml` file. Also, make sure to replace the `branch_base`, `python_version`, `is_pr`, and `branch_name` inputs with the correct values for your use case.
62+
The `gptme-bot` action will then run the `gptme` command-line tool with the command specified in the comment, and perform actions based on the output of the tool.
5163

52-
The `gptme-bot` composite action will then run the `gptme` command-line tool with the command specified in the comment, and perform actions based on the output of the tool. This includes checking out the appropriate branch, installing dependencies, running the `gptme` command, and committing and pushing any changes made by the tool. If the issue is a pull request, the action will push changes directly to the pull request branch. If the issue is not a pull request, the action will create a new pull request with the changes.
64+
If a question was asked, it will simply reply.
5365

66+
If a request was made it will check out the appropriate branch, install dependencies, run `gptme`, then commit and push any changes made. If the issue is a pull request, the bot will push changes directly to the pull request branch. If the issue is not a pull request, the bot will create a new pull request with the changes.

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ See the `README <https://github.com/ErikBjare/gptme/blob/master/README.md>`_ fil
2222
demos
2323
tools
2424
providers
25-
webui
25+
server
2626
evals
27+
bot
2728
finetuning
2829
cli
2930
api

docs/webui.rst renamed to docs/server.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
Web UI
1+
Server
22
======
33

44
.. note::
5-
The web UI is still in development and does not have all the features of the CLI.
5+
The server and web UI is still in development and does not have all the features of the CLI.
66
It does not support streaming, doesn't ask for confirmation before executing, lacks the ability to interrupt generations, etc.
77

8-
gptme has a very minimalistic web UI, it can be started by running the following command:
8+
gptme has a minimal REST API with very minimalistic web UI.
9+
10+
It can be started by running the following command:
911

1012
.. code-block:: bash
1113

0 commit comments

Comments
 (0)