Skip to content

Commit 7ca831c

Browse files
committed
Added a Try It section to README.
1 parent 612c5b0 commit 7ca831c

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,42 @@ steps:
6464
- Summarize the changes made to {{File.basename(file)}}.
6565
```
6666

67+
## Try it
68+
69+
If you don’t have one already, get an OpenAI key from [here](https://platform.openai.com/settings/organization/api-keys). You will need an account with a credit card, make sure that a basic completion works.
70+
71+
```bash
72+
export OPENAI_API_KEY=sk-proj-....
73+
74+
curl -H "Content-Type: application/json" \
75+
-H "Authorization: Bearer $API_TOKEN" \
76+
-d '{"model":"gpt-4.1-mini","messages":[{"role":"user","content":"What is 1+1?"}]}' \
77+
https://api.openai.com/v1/chat/completions
78+
```
79+
80+
The [test grading workflow](examples/grading/workflow.md) in this repository is a senior software engineer and testing expert that evaluates the quality of a test based on guidelines.
81+
82+
Try the workflow.
83+
84+
```bash
85+
./exe/roast execute examples/grading/workflow.yml test/roast/resources_test.rb
86+
87+
🔥🔥🔥 Everyone loves a good roast 🔥🔥🔥
88+
...
89+
```
90+
91+
This will output a test grade.
92+
93+
```
94+
========== TEST GRADE REPORT ==========
95+
Test file: test/roast/resources_test.rb
96+
97+
FINAL GRADE:
98+
Score: 80/100
99+
Letter Grade: B
100+
```
101+
Note that you may also need `shadowenv` and `rg`, on MacOS run `brew install shadowenv` and `brew install rg`.
102+
67103
## How to use Roast
68104
69105
1. Create a workflow YAML file defining your steps and tools

examples/grading/workflow.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Test Grading
2-
model: anthropic:claude-opus-4
2+
api_token: $(echo $OPENAI_API_KEY)
3+
# model: anthropic:claude-opus-4
4+
model: gpt-4.1-mini
35

46
tools:
57
- Roast::Tools::Grep
@@ -23,16 +25,16 @@ steps:
2325

2426
# set non-default attributes for steps below
2527
analyze_coverage:
26-
model: gpt-4.1-mini
28+
# model: gpt-4.1-mini
2729
auto_loop: false
2830
json: true
2931

3032
generate_grades:
31-
model: o3
33+
# model: o3
3234
json: true
3335

3436
generate_recommendations:
35-
model: o3
37+
# model: o3
3638
auto_loop: false
3739
json: true
3840
params:

0 commit comments

Comments
 (0)