Skip to content

Commit e286e99

Browse files
committed
got append working for dataset
1 parent 7acc0cf commit e286e99

File tree

7 files changed

+354
-131
lines changed

7 files changed

+354
-131
lines changed

nbs/backends/ragas_api_client.ipynb

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@
824824
},
825825
{
826826
"cell_type": "code",
827-
"execution_count": null,
827+
"execution_count": 26,
828828
"metadata": {},
829829
"outputs": [
830830
{
@@ -838,12 +838,12 @@
838838
" 'type': 'text',\n",
839839
" 'max_length': 255,\n",
840840
" 'is_required': True},\n",
841-
" 'created_at': '2025-04-09T23:00:50.847325+00:00',\n",
842-
" 'updated_at': '2025-04-09T23:00:50.847325+00:00',\n",
843-
" 'datatable_id': 'dd741040-9305-448a-aa4d-7987905a626a'}"
841+
" 'created_at': '2025-04-10T02:22:07.300895+00:00',\n",
842+
" 'updated_at': '2025-04-10T02:22:07.300895+00:00',\n",
843+
" 'datatable_id': 'ebc3dd3e-f88b-4f8b-8c72-6cfcae0a0cd4'}"
844844
]
845845
},
846-
"execution_count": 23,
846+
"execution_count": 26,
847847
"metadata": {},
848848
"output_type": "execute_result"
849849
}
@@ -866,7 +866,7 @@
866866
},
867867
{
868868
"cell_type": "code",
869-
"execution_count": null,
869+
"execution_count": 27,
870870
"metadata": {},
871871
"outputs": [
872872
{
@@ -880,17 +880,17 @@
880880
" 'type': 'text',\n",
881881
" 'max_length': 255,\n",
882882
" 'is_required': True},\n",
883-
" 'created_at': '2025-04-09T23:00:50.847325+00:00',\n",
884-
" 'updated_at': '2025-04-09T23:00:50.847325+00:00',\n",
885-
" 'datatable_id': 'dd741040-9305-448a-aa4d-7987905a626a'}],\n",
883+
" 'created_at': '2025-04-10T02:22:07.300895+00:00',\n",
884+
" 'updated_at': '2025-04-10T02:22:07.300895+00:00',\n",
885+
" 'datatable_id': 'ebc3dd3e-f88b-4f8b-8c72-6cfcae0a0cd4'}],\n",
886886
" 'pagination': {'offset': 0,\n",
887887
" 'limit': 50,\n",
888888
" 'total': 1,\n",
889889
" 'order_by': 'created_at',\n",
890890
" 'sort_dir': 'asc'}}"
891891
]
892892
},
893-
"execution_count": 24,
893+
"execution_count": 27,
894894
"metadata": {},
895895
"output_type": "execute_result"
896896
}
@@ -901,7 +901,7 @@
901901
},
902902
{
903903
"cell_type": "code",
904-
"execution_count": null,
904+
"execution_count": 28,
905905
"metadata": {},
906906
"outputs": [
907907
{
@@ -915,12 +915,12 @@
915915
" 'type': 'text',\n",
916916
" 'max_length': 255,\n",
917917
" 'is_required': True},\n",
918-
" 'created_at': '2025-04-09T23:00:50.847325+00:00',\n",
919-
" 'updated_at': '2025-04-09T23:00:50.847325+00:00',\n",
920-
" 'datatable_id': 'dd741040-9305-448a-aa4d-7987905a626a'}"
918+
" 'created_at': '2025-04-10T02:22:07.300895+00:00',\n",
919+
" 'updated_at': '2025-04-10T02:22:07.300895+00:00',\n",
920+
" 'datatable_id': 'ebc3dd3e-f88b-4f8b-8c72-6cfcae0a0cd4'}"
921921
]
922922
},
923-
"execution_count": 25,
923+
"execution_count": 28,
924924
"metadata": {},
925925
"output_type": "execute_result"
926926
}
@@ -934,7 +934,7 @@
934934
},
935935
{
936936
"cell_type": "code",
937-
"execution_count": null,
937+
"execution_count": 29,
938938
"metadata": {},
939939
"outputs": [
940940
{
@@ -948,12 +948,12 @@
948948
" 'type': 'text',\n",
949949
" 'max_length': 255,\n",
950950
" 'is_required': True},\n",
951-
" 'created_at': '2025-04-09T23:00:50.847325+00:00',\n",
952-
" 'updated_at': '2025-04-09T23:00:53.804834+00:00',\n",
953-
" 'datatable_id': 'dd741040-9305-448a-aa4d-7987905a626a'}"
951+
" 'created_at': '2025-04-10T02:22:07.300895+00:00',\n",
952+
" 'updated_at': '2025-04-10T02:22:11.116882+00:00',\n",
953+
" 'datatable_id': 'ebc3dd3e-f88b-4f8b-8c72-6cfcae0a0cd4'}"
954954
]
955955
},
956-
"execution_count": 26,
956+
"execution_count": 29,
957957
"metadata": {},
958958
"output_type": "execute_result"
959959
}
@@ -970,7 +970,7 @@
970970
},
971971
{
972972
"cell_type": "code",
973-
"execution_count": null,
973+
"execution_count": 30,
974974
"metadata": {},
975975
"outputs": [],
976976
"source": [
@@ -988,10 +988,11 @@
988988
},
989989
{
990990
"cell_type": "code",
991-
"execution_count": null,
991+
"execution_count": 31,
992992
"metadata": {},
993993
"outputs": [],
994994
"source": [
995+
"#| export\n",
995996
"#---- Dataset Rows ----\n",
996997
"@patch\n",
997998
"async def list_dataset_rows(\n",
@@ -1053,6 +1054,35 @@
10531054
" )\n"
10541055
]
10551056
},
1057+
{
1058+
"cell_type": "code",
1059+
"execution_count": 32,
1060+
"metadata": {},
1061+
"outputs": [
1062+
{
1063+
"data": {
1064+
"text/plain": [
1065+
"{'id': 'new_row_1',\n",
1066+
" 'data': {'id': 'new_row_1', 'new_column_1': 'value', 'new_column_2': 'value'},\n",
1067+
" 'created_at': '2025-04-10T02:22:34.470887+00:00',\n",
1068+
" 'updated_at': '2025-04-10T02:22:34.470887+00:00',\n",
1069+
" 'datatable_id': 'ebc3dd3e-f88b-4f8b-8c72-6cfcae0a0cd4'}"
1070+
]
1071+
},
1072+
"execution_count": 32,
1073+
"metadata": {},
1074+
"output_type": "execute_result"
1075+
}
1076+
],
1077+
"source": [
1078+
"await client.create_dataset_row(\n",
1079+
" project_id=projects[\"items\"][0][\"id\"],\n",
1080+
" dataset_id=datasets[\"id\"],\n",
1081+
" id=\"new_row_1\",\n",
1082+
" data={\"new_column_1\": \"value\", \"new_column_2\": \"value\"},\n",
1083+
")\n"
1084+
]
1085+
},
10561086
{
10571087
"cell_type": "markdown",
10581088
"metadata": {},

0 commit comments

Comments
 (0)