# Terminal commands are shown in code blocks like this pip install cyborgdb-core
# Python code examples use syntax highlighting from cyborgdb_core import Client client = Client(api_key="your-key")
"create index"
python authentication
similarity_search
from cyborgdb_core import Client client = Client(api_key="your-key")
# Complete working example from cyborgdb_core import Client, DBConfig client = Client( api_key="your-api-key", index_location=DBConfig("memory"), config_location=DBConfig("memory") ) # Create index and add vectors index = client.create_index("my-index", dimension=384) index.add_vectors([1, 2, 3, ...], metadata={"doc": "example"}) # Search for similar vectors results = index.search([1, 2, 3, ...], k=5) print(results)
Was this page helpful?