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
from typing import List, Dict, Any, Optional, Union
46
46
47
47
# 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
49
49
50
50
@reward_function
51
51
defexact_tool_match_reward(
@@ -108,7 +108,7 @@ def exact_tool_match_reward(
108
108
})
109
109
110
110
```
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.
112
112
113
113
### 2. Testing Your Reward Function with a Dataset
114
114
@@ -140,8 +140,8 @@ Effective testing of a reward function involves evaluating it against a represen
140
140
While `reward-protocol run` is the primary way to evaluate with datasets, here's a conceptual local test:
141
141
142
142
```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
145
145
146
146
# Sample 1: Correct tool call
147
147
test_messages_correct = [
@@ -317,7 +317,7 @@ This is ideal for development, testing webhook integrations, or accessing your r
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`.
455
455
456
456
```python
457
457
from openevals import exact_match
458
-
from reward_kit.integrations.openeval import adapt
458
+
from reward_protocol.integrations.openeval import adapt
459
459
460
460
exact_match_reward = adapt(exact_match)
461
461
result = exact_match_reward(
@@ -466,13 +466,13 @@ print(result.score)
466
466
```
467
467
468
468
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`
470
470
converts a deepeval metric instance into a reward function returning an
471
471
`EvaluateResult`.
472
472
473
473
```python
474
474
from deepeval.metrics import FaithfulnessMetric
475
-
from reward_kit.integrations.deepeval import adapt_metric
475
+
from reward_protocol.integrations.deepeval import adapt_metric
0 commit comments