File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,6 @@ print(f"Score: {result.score}")
28
28
print (f " Reasoning: { result.reasoning} " )
29
29
```
30
30
31
- ** Sample Output:**
32
- ```
33
- Decision: 9
34
- Score: 9.0
35
- Reasoning: The statement is technically accurate. Python is indeed known for its
36
- versatility and simple, readable syntax, making it popular for various applications.
37
- ```
38
-
39
31
## 📊 Using Pre-built Metrics
40
32
41
33
vLLM Judge comes with 20+ pre-built metrics:
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ pip install vllm-judge[dev]
33
33
from vllm_judge import Judge
34
34
35
35
# Initialize with vLLM url
36
- judge = Judge.from_url(" http://localhost :8000" )
36
+ judge = Judge.from_url(" http://vllm-server :8000" )
37
37
38
38
# Simple evaluation
39
39
result = await judge.evaluate(
@@ -67,7 +67,7 @@ result = await judge.evaluate(
67
67
Run Judge as a REST API:
68
68
69
69
``` bash
70
- vllm-judge serve --base-url http://localhost :8000 --port 9090 --host localhost
70
+ vllm-judge serve --base-url http://vllm-server :8000 --port 9090
71
71
```
72
72
73
73
Then use the HTTP API:
@@ -77,7 +77,7 @@ from vllm_judge.api import JudgeClient
77
77
78
78
client = JudgeClient(" http://localhost:9090" )
79
79
result = await client.evaluate(
80
- response = " Python is great! " ,
80
+ response = " Python is a versatile programming language known for its simple syntax. " ,
81
81
criteria = " technical accuracy"
82
82
)
83
83
```
You can’t perform that action at this time.
0 commit comments