iota
1.0.0

IOTA - ฐานข้อมูลการฝังในพื้นที่น้อยที่สุด
โครงการนี้ทำโดยมีวัตถุประสงค์เพื่อสร้างคุณสมบัติที่ฉันโปรดปรานบางอย่างจากร้านค้าเวกเตอร์ที่มีอยู่ในขณะที่ยังคงความเรียบง่ายและความเรียบง่าย
สำคัญ
นี่คือไม่สามารถปรับขนาดได้ แต่ควรพอเพียงสำหรับโครงการขนาดเล็ก
ติดตั้งแพ็คเกจผ่าน PYPI:
pip install iotadbนี่คือตัวอย่างที่ง่ายมาก:
from iotadb import IotaDB , Document
# Define a list of documents
docs = [
Document ( text = "That is a happy dog" ),
Document ( text = "That is a very happy person" ),
Document ( text = "Today is a sunny day" )
]
# Create a collection
db = IotaDB ()
db . create_collection ( name = "my_collection" , documents = docs )
# Query documents within your collection
results = db . search ( "That is a happy person" , return_similarities = True )
for doc , score in results :
print ( f"Text: { doc . text } " )
print ( f"similarity: { score :.3f } n " ) ตัวอย่างเพิ่มเติมสามารถพบได้ในไดเรกทอรี /examples
สนใจที่จะบริจาค? ตรงไปที่คู่มือการบริจาคสำหรับรายละเอียดเพิ่มเติม