Skip to content

Commit 004d49f

Browse files
committed
update
1 parent 4babc33 commit 004d49f

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ Reward Protocol allows you to define custom logic to evaluate model responses. H
3737

3838
```python
3939
# This is a conceptual example of how exact_tool_match_reward is defined and used.
40-
# You would typically import it from reward_kit.rewards.function_calling.
40+
# You would typically import it from reward_protocol.rewards.function_calling.
4141
# For actual usage, you configure it in your YAML files for `reward-protocol run`.
4242

43-
from reward_kit import reward_function
44-
from reward_kit.models import EvaluateResult, Message, MetricResult
43+
from reward_protocol import reward_function
44+
from reward_protocol.models import EvaluateResult, Message, MetricResult
4545
from typing import List, Dict, Any, Optional, Union
4646

4747
# Definition of exact_tool_match_reward (simplified for brevity, see source for full details)
48-
# from reward_kit.rewards.function_calling import exact_tool_match_reward, eval_tool_call
48+
# from reward_protocol.rewards.function_calling import exact_tool_match_reward, eval_tool_call
4949

5050
@reward_function
5151
def exact_tool_match_reward(
@@ -108,7 +108,7 @@ def exact_tool_match_reward(
108108
})
109109

110110
```
111-
This example illustrates the structure. The actual `exact_tool_match_reward` in `reward_kit.rewards.function_calling` handles complex parsing and comparison of tool calls.
111+
This example illustrates the structure. The actual `exact_tool_match_reward` in `reward_protocol.rewards.function_calling` handles complex parsing and comparison of tool calls.
112112

113113
### 2. Testing Your Reward Function with a Dataset
114114

@@ -140,8 +140,8 @@ Effective testing of a reward function involves evaluating it against a represen
140140
While `reward-protocol run` is the primary way to evaluate with datasets, here's a conceptual local test:
141141

142142
```python
143-
from reward_kit.rewards.function_calling import exact_tool_match_reward # Import the actual function
144-
from reward_kit.models import Message
143+
from reward_protocol.rewards.function_calling import exact_tool_match_reward # Import the actual function
144+
from reward_protocol.models import Message
145145

146146
# Sample 1: Correct tool call
147147
test_messages_correct = [
@@ -317,7 +317,7 @@ This is ideal for development, testing webhook integrations, or accessing your r
317317
Or deploy programmatically:
318318

319319
```python
320-
from reward_kit.evaluation import create_evaluation
320+
from reward_protocol.evaluation import create_evaluation
321321

322322
evaluator = create_evaluation(
323323
evaluator_id="my-evaluator",
@@ -335,8 +335,8 @@ evaluator = create_evaluation(
335335
Combine multiple metrics in a single reward function:
336336

337337
```python
338-
from reward_kit import reward_function
339-
from reward_kit.models import EvaluateResult, MetricResult, Message # Assuming models are here
338+
from reward_protocol import reward_function
339+
from reward_protocol.models import EvaluateResult, MetricResult, Message # Assuming models are here
340340
from typing import List, Dict, Any, Optional
341341

342342
@reward_function
@@ -451,11 +451,11 @@ Check the `examples` directory for complete examples:
451451
- `apps_coding_example/`: Shows CLI-based evaluation (`reward-protocol run`) for code generation tasks (APPS dataset).
452452
- `apps_coding_example/`: Shows CLI-based evaluation (`reward-protocol run`) for code generation tasks (APPS dataset).
453453

454-
The OpenEvals project provides a suite of evaluators that can be used directly within Reward Protocol. The helper `reward_kit.integrations.openeval.adapt` converts any OpenEvals evaluator into a reward function returning an `EvaluateResult`.
454+
The OpenEvals project provides a suite of evaluators that can be used directly within Reward Protocol. The helper `reward_protocol.integrations.openeval.adapt` converts any OpenEvals evaluator into a reward function returning an `EvaluateResult`.
455455

456456
```python
457457
from openevals import exact_match
458-
from reward_kit.integrations.openeval import adapt
458+
from reward_protocol.integrations.openeval import adapt
459459
460460
exact_match_reward = adapt(exact_match)
461461
result = exact_match_reward(
@@ -466,13 +466,13 @@ print(result.score)
466466
```
467467

468468
The [deepeval](https://github.com/confident-ai/deepeval) project also offers a
469-
variety of metrics. The helper `reward_kit.integrations.deepeval.adapt_metric`
469+
variety of metrics. The helper `reward_protocol.integrations.deepeval.adapt_metric`
470470
converts a deepeval metric instance into a reward function returning an
471471
`EvaluateResult`.
472472

473473
```python
474474
from deepeval.metrics import FaithfulnessMetric
475-
from reward_kit.integrations.deepeval import adapt_metric
475+
from reward_protocol.integrations.deepeval import adapt_metric
476476
477477
faithfulness_reward = adapt_metric(FaithfulnessMetric())
478478
result = faithfulness_reward(
@@ -489,7 +489,7 @@ way:
489489
```python
490490
from deepeval.metrics import GEval
491491
from deepeval.test_case import LLMTestCaseParams
492-
from reward_kit.integrations.deepeval import adapt_metric
492+
from reward_protocol.integrations.deepeval import adapt_metric
493493
494494
correctness_metric = GEval(
495495
name="Correctness",

0 commit comments

Comments
 (0)