EmbedInDB
v0.2.1
Embedin은 MySQL, PostgreSQL 및 MS SQL Server와 같은 인기있는 데이터베이스를 제로 노력으로 벡터 데이터베이스로 원활하게 변환하는 오픈 소스 벡터 데이터베이스 및 효율적인 라이브러리입니다.
Embedin은 자연 언어 처리, 이미지 인식 및 권장 시스템과 같은 AI 애플리케이션에 이상적인 솔루션으로 빠른 인덱싱 및 검색을 제공합니다. 간단한 API 및 쿼리 언어는 사용 편의성과 원활한 통합을 보장합니다.
파이썬 3.7 이상.
pip install embedin from embedin import Embedin
client = Embedin ( collection_name = "test_collection" , texts = [ "This is a test" , "Hello world!" ])
result = client . query ( "These are tests" , top_k = 1 ) # Query the most similar text from the collection
print ( result ) from embedin import Embedin
url = 'sqlite:///test.db'
client = Embedin ( collection_name = "test_collection" , texts = [ "This is a test" , "Hello world!" ], url = url )
result = client . query ( "These are tests" , top_k = 1 ) cd docker
docker-compose up embedin-postgres예
import os
from embedin import Embedin
url = os . getenv ( 'EMBEDIN_POSGRES_URL' , "postgresql+psycopg2://embedin:embedin@localhost/embedin_db" )
client = Embedin ( collection_name = "test_collection" , texts = [ "This is a test" , "Hello world!" ], url = url )
result = client . query ( "These are tests" , top_k = 1 ) cd docker
docker-compose up embedin-mysql예
import os
from embedin import Embedin
url = os . getenv ( 'EMBEDIN_MYSQL_URL' , "mysql+pymysql://embedin:embedin@localhost/embedin_db" )
client = Embedin ( collection_name = "test_collection" , texts = [ "This is a test" , "Hello world!" ], url = url )
result = client . query ( "These are tests" , top_k = 1 ) cd docker
docker-compose up embedin-mssql예
import os
from embedin import Embedin
url = os . getenv ( 'EMBEDIN_MSSQL_URL' , "mssql+pymssql://sa:StrongPassword123@localhost/tempdb" )
client = Embedin ( collection_name = "test_collection" , url = url )
client . add_data ( texts = [ "This is a test" ], meta_data = [{ "source" : "abc4" }])
result = client . query ( "These are tests" , top_k = 1 )기고자 안내서를 참조하십시오