Skip to content

Commit d23d542

Browse files
committed
Update docs
Signed-off-by: Michael Yuan <[email protected]>
1 parent 97a34c5 commit d23d542

File tree

7 files changed

+30
-31
lines changed

7 files changed

+30
-31
lines changed

README.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
</a>
1717
</p>
1818

19-
[Deploy this function on flows.network](#deploy-your-own-code-review-bot-in-3-simple-steps), and you will get a GitHub agent to review and summarize Pull Requests. It helps busy open source contributors understand and make decisions on PRs faster! A few examples below!
19+
[Deploy this function on flows.network](), and you will get an AI agent to review and summarize GitHub Pull Requests. It helps busy open source contributors understand and make decisions on PRs faster! Here are some examples. Notice how the code review bot provides code snippets to show you how to improve the code!
2020

21-
> We recommend you to use a [GaiaNet node](https://github.com/GaiaNet-AI/gaianet-node) running an open source coding LLM as the backend to perform PR reviews and summarizations. You can use [a community node](https://docs.gaianet.ai/user-guide/nodes#codestral-22b-v01) or run a node [on your own computer](https://github.com/GaiaNet-AI/node-configs/tree/main/codestral-0.1-22b)!
21+
> We recommend you to use a [Gaia node](https://github.com/GaiaNet-AI/gaianet-node) running an open source coding LLM as the backend to perform PR reviews and summarizations. You can use [a community node](https://docs.gaianet.ai/user-guide/nodes#codestral) or run a node [on your own computer](https://github.com/GaiaNet-AI/node-configs/tree/main/codestral-0.1-22b)!
2222
2323
* [[Rust] Improve support for host functions in the WasmEdge Rust SDK](https://github.com/WasmEdge/WasmEdge/pull/2394#issuecomment-1497819842)
2424
* [[bash] Support ARM architecture in the WasmEdge installer](https://github.com/WasmEdge/WasmEdge/pull/1084#issuecomment-1497830324)
2525
* [[C++] Add an eBPF plugin for WasmEdge](https://github.com/WasmEdge/WasmEdge/pull/2314#issuecomment-1497861516)
2626
* [[Haskell] Improve the CLI utility for WasmEdge Component Model tooling](https://github.com/second-state/witc/pull/73#issuecomment-1507539260)
2727

28-
> Still not convinced? [See "potential problems 1" in this review](https://github.com/second-state/wasmedge-quickjs/pull/82#issuecomment-1498299630), it identified an inefficient Rust implementation of an algorithm. 🤯
28+
> Still not convinced? [See "potential problems 1" in this review](https://github.com/second-state/wasmedge-quickjs/pull/82#issuecomment-1498299630), it identified an inefficient Rust implementation of an algorithm.
2929
3030
This bot **summarizes commits in the PR**. Alternatively, you can use [this bot](https://github.com/flows-network/github-pr-review) to review changed files in the PR.
3131

@@ -38,61 +38,60 @@ This flow function will be triggered when a new PR is raised in the designated G
3838

3939
## Deploy your own code review bot in 3 simple steps
4040

41-
1. Create a bot from your own GitHub repo
42-
2. Configure the bot to review PRs
41+
1. Create a bot from template
42+
2. Connect to an LLM
4343
3. Connect to GitHub for access to the target repo
4444

4545
### 0 Prerequisites
4646

4747
You will also need to sign into [flows.network](https://flows.network/) from your GitHub account. It is free.
4848

49-
### 1 Create a bot from your own GitHub repo
49+
### 1 Create a bot from template
5050

51-
Just fork this repo to your own GitHub account.
51+
Create a flow function from [this template]().
52+
It will fork a repo into your personal GitHub account. Your flow function will be compiled from the source code
53+
in your forked repo. You can configure how it is summoned from the GitHub PR.
5254

53-
Then, from [flows.network](https://flows.network/), you can "Create a Flow" and select your forked repo.
54-
It will create a flow function based on the code in your forked repo.
55+
* `trigger_phrase` : The magic words to write in a PR comment to summon the bot. It defaults to "flows summarize".
5556

56-
Click on the "Advanced" button to see configuration options for the flow function.
57+
Click on the **Create and Build** button.
5758

58-
### 2 Configure the bot to review PRs
59+
> Alternatively, fork this repo to your own GitHub account. Then, from [flows.network](https://flows.network/), you can **Create a Flow** and select your forked repo. It will create a flow function based on the code in your forked repo. Click on the **Advanced** button to see configuration options for the flow function.
5960
60-
<img src="https://raw.githubusercontent.com/flows-network/github-pr-summary/main/images/config.png" width="450"/>
61+
[<img width="450" src="create.png">](create.png)
6162

62-
Next, you will tell the bot which GitHub repo it needs to monitor for upcoming PRs to review.
63+
### 2 Connect to an LLM
6364

64-
* `github_owner`: GitHub org for the repo *you want to review PRs*
65-
* `github_repo` : GitHub repo *you want to review PRs*
66-
* `trigger_phrase` : The magic words to write in a PR comment to summon the bot. It defaults to "flows summarize".
65+
Configure the LLM API service you want to use to summarize the PRs.
6766

68-
> Let's see an example. You would like to deploy the bot to review code in PRs on `WasmEdge/wasmedge_hyper_demo` repo. Here `github_owner = WasmEdge` and `github_repo = wasmedge_hyper_demo`.
67+
* `llm_api_endpoint` : The OpenAI compatible API service endpoint for the LLM to conduct code reviews. We recommend the [Codestral Gaia node](https://github.com/GaiaNet-AI/node-configs/tree/main/codestral-0.1-22b): `https://codestral.us.gaianet.network/v1`
68+
* `llm_model_name` : The model name required by the API service. We recommend the following model name for the above public Gaia node: `codestral`
69+
* `llm_ctx_size` : The context window size of the selected model. The Codestral model has a 32k context window, which is `32768`.
70+
* `llm_api_key` : Optional: The API key if required by the LLM service provider. It is not required for the Gaia node.
6971

70-
And the LLM API service you want to use to review the PRs.
72+
Click on the **Continue** button.
7173

72-
* `llm_api_endpoint` : The OpenAI compatible API service endpoint for the LLM to conduct code reviews. We recommend
73-
the [Codetral-0.1-22B GaiaNet node](https://github.com/GaiaNet-AI/node-configs/tree/main/codestral-0.1-22b): `https://codestral-01-22b.us.gaianet.network/v1`
74-
* `llm_model_name` : The model name required by the API service. We recommend the following model name for the above GaiaNet node: `Codestral-22B-v0.1-hf-Q5_K_M`
75-
* `llm_ctx_size` : The context window size of the selected model. The Codestral 0.1 model has a 16k context window, which is `16384`.
76-
* `llm_api_key` : Optional: The API key if required by the LLM service provider. It is not required for the GaiaNet node.
74+
### 3 Connect to GitHub for access to the target repo
7775

78-
Click on the **Build** button.
76+
Next, you will tell the bot which GitHub repo it needs to monitor for upcoming PRs to summarize.
7977

80-
### 3 Connect to GitHub for access to the target repo
78+
* `github_owner`: GitHub org for the repo you want to summarize PRs
79+
* `github_repo` : GitHub repo you want to summarize PRs
8180

82-
Finally, the GitHub repo will need to give you access so that the flow function can
83-
access and review its PRs! In this next screen, you will connect to GitHub and authorize access.
81+
> Let's see an example. You would like to deploy the bot to summarize PRs on `WasmEdge/wasmedge_hyper_demo` repo. Here `github_owner = WasmEdge` and `github_repo = wasmedge_hyper_demo`.
8482
85-
Click on the **Connect** or **+ Add new authentication** button to give the function access to the GitHub repo. You'll be redirected to a new page where you must grant [flows.network](https://flows.network/) permission to the repo.
83+
Finally, the GitHub repo will need to give you access so that the flow function can access and summarize its PRs!
84+
Click on the **Connect** or **+ Add new authentication** button to give the function access to the GitHub repo. You'll be redirected to a new page where you must grant flows.network permission to the repo.
8685

87-
<img src="https://raw.githubusercontent.com/flows-network/github-pr-summary/main/images/github_integration.png" width="450"/>
86+
[<img width="450" src="llm.png">](llm.png)
8887

89-
Close the tab and go back to the flow.network page once you are done. Click on **Deploy**.
88+
Click on **Deploy**.
9089

9190
### Wait for the magic!
9291

9392
This is it! You are now on the flow details page waiting for the flow function to build. As soon as the flow's status became `running`, the bot is ready to give code reviews! The bot is summoned by every new PR, every new commit, as well as magic words (i.e., `trigger_phrase`) in PR comments.
9493

95-
<img src="https://raw.githubusercontent.com/flows-network/github-pr-summary/main/images/success.png" width="450"/>
94+
[<img width="450" src="target.png">](target.png)
9695

9796
## FAQ
9897

create.png

192 KB
Loading

images/config.png

-209 KB
Binary file not shown.

images/github_integration.png

-429 KB
Binary file not shown.

images/success.png

-125 KB
Binary file not shown.

llm.png

200 KB
Loading

target.png

226 KB
Loading

0 commit comments

Comments
 (0)