You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from swarms.memory import ChromaDB
|
|
|
|
# Initialize the memory
|
|
chroma = ChromaDB(
|
|
metric="cosine",
|
|
limit_tokens=1000,
|
|
verbose=True,
|
|
)
|
|
|
|
# Add text
|
|
text = "This is a test"
|
|
chroma.add(text)
|
|
|
|
# Search for similar text
|
|
similar_text = chroma.query(text)
|