Skip to content

Commit b59b670

Browse files
committed
docs: add text to kotlin samples
1 parent 0f9dbc4 commit b59b670

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed
+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 8,
6+
"id": "6417ba24-7c62-46b6-9b15-6c6aedda2577",
7+
"metadata": {
8+
"execution": {
9+
"iopub.execute_input": "2023-04-11T10:01:05.350841Z",
10+
"iopub.status.busy": "2023-04-11T10:01:05.350379Z",
11+
"iopub.status.idle": "2023-04-11T10:01:12.674039Z",
12+
"shell.execute_reply": "2023-04-11T10:01:12.673053Z",
13+
"shell.execute_reply.started": "2023-04-11T10:01:05.350823Z"
14+
},
15+
"tags": []
16+
},
17+
"outputs": [
18+
{
19+
"name": "stdout",
20+
"output_type": "stream",
21+
"text": [
22+
"@Query(\"SELECT * FROM person WHERE is_beautiful = 1\")\n",
23+
" fun getMostBeautifulPerson(): List<Person>\n",
24+
"@Insert(onConflict = OnConflictStrategy.REPLACE)\n",
25+
" fun insert(person: Person)\n",
26+
"@Query(\"SELECT * FROM geofences\")\n",
27+
" fun getGeofences(): List<Geofence>\n",
28+
"@Query(\"SELECT * FROM ConversationRoleActionEntity\")\n",
29+
" fun getAll(): List<ConversationRoleActionEntity>\n"
30+
]
31+
}
32+
],
33+
"source": [
34+
"evaluate(\"text to kotlin repository with class\", \"我想查询谁是最美丽的人\", 0.1, 0.75, 40, 4, 512)\n",
35+
"evaluate(\"text to kotlin repository with class\", \"小明今年几岁 \\n ### data class Person(val age: Int, val name: String)###\", 0.1, 0.75, 40, 4, 512)\n",
36+
"evaluate(\"text to kotlin repository with class\", \"我想获取所有当前未完成任务(tasks)中的活动地理围栏(geofences),并返回这些地理围栏所关联的位置(places)信息以及任务(tasks)信息,以便于我的位置服务能够根据获得的信息正确地处理任务。\", 0.1, 0.75, 40, 4, 512)\n",
37+
"evaluate(\"text to kotlin repository with class\", \"我想获取所有对话角色操作(ConversationRoleActionEntity)的列表(List),以便于查看所有对话角色操作的详细信息。。 ###data class ConversationRoleActionEntity(val id: Int, val source: String, val target: String)###\", 0.1, 0.75, 40, 4, 512)"
38+
]
39+
},
40+
{
41+
"cell_type": "code",
42+
"execution_count": 14,
43+
"id": "6d29e332-3d96-4081-a891-90326bf901e4",
44+
"metadata": {
45+
"execution": {
46+
"iopub.execute_input": "2023-04-11T10:07:27.597204Z",
47+
"iopub.status.busy": "2023-04-11T10:07:27.596923Z",
48+
"iopub.status.idle": "2023-04-11T10:07:29.312488Z",
49+
"shell.execute_reply": "2023-04-11T10:07:29.311197Z",
50+
"shell.execute_reply.started": "2023-04-11T10:07:27.597183Z"
51+
},
52+
"tags": []
53+
},
54+
"outputs": [
55+
{
56+
"name": "stdout",
57+
"output_type": "stream",
58+
"text": [
59+
"@Query(\"SELECT COUNT(*) FROM User WHERE age = :age\")\n",
60+
" abstract fun getBlogCount(age: Int): Long\n"
61+
]
62+
}
63+
],
64+
"source": [
65+
"evaluate(\"text to kotlin repository with class\", \"我想查询指定年龄的用户(User)的博客数量。\\n ###data class User(var age: Int, val blogId: Int) data class Post(val title: String)###\", 0.1, 0.75, 40, 4, 512)\n"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": null,
71+
"outputs": [],
72+
"source": [
73+
"evaluate(\"text to kotlin repository with class\", \"查询员工 id 为 325 的员工(员工信息数据表EMP)的名字和其所在部门(部门信息数据表 DEPT)的名字。\", 0.1, 0.75, 40, 4, 512)"
74+
],
75+
"metadata": {
76+
"collapsed": false
77+
}
78+
}
79+
],
80+
"metadata": {
81+
"kernelspec": {
82+
"display_name": "Python 3 (ipykernel)",
83+
"language": "python",
84+
"name": "python3"
85+
},
86+
"language_info": {
87+
"codemirror_mode": {
88+
"name": "ipython",
89+
"version": 3
90+
},
91+
"file_extension": ".py",
92+
"mimetype": "text/x-python",
93+
"name": "python",
94+
"nbconvert_exporter": "python",
95+
"pygments_lexer": "ipython3",
96+
"version": "3.8.13"
97+
}
98+
},
99+
"nbformat": 4,
100+
"nbformat_minor": 5
101+
}

0 commit comments

Comments
 (0)