You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,16 @@
16
16
</a>
17
17
</p>
18
18
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!
20
20
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)!
22
22
23
23
*[[Rust] Improve support for host functions in the WasmEdge Rust SDK](https://github.com/WasmEdge/WasmEdge/pull/2394#issuecomment-1497819842)
24
24
*[[bash] Support ARM architecture in the WasmEdge installer](https://github.com/WasmEdge/WasmEdge/pull/1084#issuecomment-1497830324)
25
25
*[[C++] Add an eBPF plugin for WasmEdge](https://github.com/WasmEdge/WasmEdge/pull/2314#issuecomment-1497861516)
26
26
*[[Haskell] Improve the CLI utility for WasmEdge Component Model tooling](https://github.com/second-state/witc/pull/73#issuecomment-1507539260)
27
27
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.
29
29
30
30
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.
31
31
@@ -38,61 +38,60 @@ This flow function will be triggered when a new PR is raised in the designated G
38
38
39
39
## Deploy your own code review bot in 3 simple steps
40
40
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
43
43
3. Connect to GitHub for access to the target repo
44
44
45
45
### 0 Prerequisites
46
46
47
47
You will also need to sign into [flows.network](https://flows.network/) from your GitHub account. It is free.
48
48
49
-
### 1 Create a bot from your own GitHub repo
49
+
### 1 Create a bot from template
50
50
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.
52
54
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".
55
56
56
-
Click on the "Advanced" button to see configuration options for the flow function.
57
+
Click on the **Create and Build** button.
57
58
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.
Next, you will tell the bot which GitHub repo it needs to monitor for upcoming PRs to review.
63
+
### 2 Connect to an LLM
63
64
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.
67
66
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.
69
71
70
-
And the LLM API service you want to use to review the PRs.
72
+
Click on the **Continue** button.
71
73
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
77
75
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.
79
77
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
81
80
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`.
84
82
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.
Close the tab and go back to the flow.network page once you are done. Click on **Deploy**.
88
+
Click on **Deploy**.
90
89
91
90
### Wait for the magic!
92
91
93
92
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.
0 commit comments