Skip to content

Commit d0d1d7f

Browse files
committed
merge main
1 parent b11347a commit d0d1d7f

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

cookbook/use_dataset_for_finetuning.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,6 @@
77

88
p = Parea(api_key=os.getenv("PAREA_API_KEY"))
99

10-
dataset = p.get_collection(188) # Replace DATASET_ID with the actual dataset ID
10+
dataset = p.get_collection("DATASET_ID") # Replace DATASET_ID with the actual dataset ID
1111

12-
print(dataset.testcases[0])
13-
# dataset.write_to_finetune_jsonl("finetune.jsonl")
14-
# a = TestCase(
15-
# id=9730,
16-
# test_case_collection_id=188,
17-
# inputs={
18-
# "messages": '[\n {\n "created_at": "2024-08-05T21:02:40.439Z",\n "user_name": "Customer",\n "rendered_message": "Hi"\n },\n {\n "created_at": "2024-08-05T21:02:40.857Z",\n "user_name": "Bot",\n "rendered_message": "_Tarek_ here from Rasayel ☺️ \\nI am here to support you with any questions you may have about Rasayel. 😃\\nWhich language do you feel more comfortable with?\\nنحن هنا لنقدم لك الدعم في أي استفسار قد يكون لديك حول رسايل. 😃\\nأي لغة تشعر بالراحة أكثر في التحدث بها؟"\n },\n {\n "created_at": "2024-08-05T21:03:02.737Z",\n "user_name": "Customer",\n "rendered_message": "English"\n },\n {\n "created_at": "2024-08-05T21:03:03.246Z",\n "user_name": "Bot",\n "rendered_message": "Great!\\nSo what brings you to us today? ☺️"\n }\n]'
19-
# },
20-
# target="",
21-
# tags=[""],
22-
# )
23-
print(dataset.filter_testcases(id=9730))
24-
print(dataset.filter_testcases(test_case_collection_id=188))
25-
print(dataset.filter_testcases(target=""))
26-
print(dataset.filter_testcases(tags=[""]))
12+
dataset.write_to_finetune_jsonl("finetune.jsonl")

0 commit comments

Comments
 (0)