Skip to content

Commit 89107c5

Browse files
committed
update
1 parent 08f7d5a commit 89107c5

1 file changed

Lines changed: 43 additions & 13 deletions

File tree

examples/hello_epsilla_embedding.py

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
{"name": "Doc", "dataType": "STRING"},
3232
],
3333
indices=[
34-
{"name": "Index", "field": "Doc"},
35-
]
34+
{"name": "Index", "field": "Doc"},
35+
],
3636
)
3737
print(response)
3838

@@ -44,16 +44,46 @@
4444
status_code, response = client.insert(
4545
table_name="MyTable",
4646
records=[
47-
{"ID": 1, "Doc": "The garden was blooming with vibrant flowers, attracting butterflies and bees with their sweet nectar."},
48-
{"ID": 2, "Doc": "In the busy city streets, people rushed to and fro, hardly noticing the beauty of the day."},
49-
{"ID": 3, "Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages."},
50-
{"ID": 4, "Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below."},
51-
{"ID": 5, "Doc": "At the beach, children played joyfully in the sand, building castles and chasing the waves."},
52-
{"ID": 6, "Doc": "Deep in the forest, a deer cautiously stepped out, its ears alert for any signs of danger."},
53-
{"ID": 7, "Doc": "The old town's historical architecture spoke volumes about its rich cultural past."},
54-
{"ID": 8, "Doc": "Night fell, and the sky was a canvas of stars, shining brightly in the moon's soft glow."},
55-
{"ID": 9, "Doc": "A cozy cafe on the corner served the best hot chocolate, warming the hands and hearts of its visitors."},
56-
{"ID": 10, "Doc": "The artist's studio was cluttered but inspiring, filled with unfinished canvases and vibrant paints."},
47+
{
48+
"ID": 1,
49+
"Doc": "The garden was blooming with vibrant flowers, attracting butterflies and bees with their sweet nectar.",
50+
},
51+
{
52+
"ID": 2,
53+
"Doc": "In the busy city streets, people rushed to and fro, hardly noticing the beauty of the day.",
54+
},
55+
{
56+
"ID": 3,
57+
"Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages.",
58+
},
59+
{
60+
"ID": 4,
61+
"Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below.",
62+
},
63+
{
64+
"ID": 5,
65+
"Doc": "At the beach, children played joyfully in the sand, building castles and chasing the waves.",
66+
},
67+
{
68+
"ID": 6,
69+
"Doc": "Deep in the forest, a deer cautiously stepped out, its ears alert for any signs of danger.",
70+
},
71+
{
72+
"ID": 7,
73+
"Doc": "The old town's historical architecture spoke volumes about its rich cultural past.",
74+
},
75+
{
76+
"ID": 8,
77+
"Doc": "Night fell, and the sky was a canvas of stars, shining brightly in the moon's soft glow.",
78+
},
79+
{
80+
"ID": 9,
81+
"Doc": "A cozy cafe on the corner served the best hot chocolate, warming the hands and hearts of its visitors.",
82+
},
83+
{
84+
"ID": 10,
85+
"Doc": "The artist's studio was cluttered but inspiring, filled with unfinished canvases and vibrant paints.",
86+
},
5787
],
5888
)
5989
print(response)
@@ -64,7 +94,7 @@
6494
query_text="Where can I find a serene environment, ideal for relaxation and introspection?",
6595
response_fields=["Doc"],
6696
with_distance=True,
67-
limit=3
97+
limit=3,
6898
)
6999
print(response)
70100

0 commit comments

Comments
 (0)