Skip to content

Commit ecf21ce

Browse files
committed
use the same json schema fixer as xlam does, an operator entered main with xlam
Signed-off-by: dafnapension <dafnashein@yahoo.com>
1 parent 5e007a2 commit ecf21ce

File tree

11 files changed

+42
-11
lines changed

11 files changed

+42
-11
lines changed

prepare/cards/bfcl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Copy,
77
ExecuteExpression,
88
FilterByExpression,
9+
FixJsonSchemaOfParameterTypes,
910
Set,
1011
)
1112
from unitxt.stream_operators import DeleteSplits, JoinStreams
@@ -105,7 +106,7 @@
105106
DeleteSplits(splits=["questions", "answers"]),
106107
Copy(field="question/*/0", to_field="dialog"),
107108
Copy(field="function", to_field="tools"),
108-
"operators.fix_json_schema",
109+
FixJsonSchemaOfParameterTypes(main_field="tools"),
109110
FilterByExpression(
110111
expression="all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"
111112
),

src/unitxt/catalog/cards/bfcl/multi_turn/java_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/javascript_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/live_multiple_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/live_parallel_multiple_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/live_parallel_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/live_simple_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/multiple_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/parallel_multiple_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

src/unitxt/catalog/cards/bfcl/multi_turn/parallel_v3.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
"field": "function",
3838
"to_field": "tools"
3939
},
40-
"operators.fix_json_schema",
40+
{
41+
"__type__": "fix_json_schema_of_parameter_types",
42+
"main_field": "tools"
43+
},
4144
{
4245
"__type__": "filter_by_expression",
4346
"expression": "all(isinstance(v, dict) for d in ground_truth for k, v in d.items())"

0 commit comments

Comments
 (0)