EmbedInDB
v0.2.1
INCREDIN es una base de datos vectorial de código abierto y una biblioteca eficiente que convierte perfectamente bases de datos populares como MySQL, Postgresql y MS SQL Server en bases de datos vectoriales con cero esfuerzo.
Incruscador es una solución ideal para aplicaciones de IA como procesamiento del lenguaje natural, reconocimiento de imágenes y sistemas de recomendación, que ofrece una rápida indexación y recuperación. Su simple API y lenguaje de consulta aseguran la facilidad de uso y la integración perfecta.
Python 3.7 o superior.
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-postgresejemplo
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-mysqlejemplo
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-mssqlejemplo
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 )Consulte la Guía de contribuyentes