Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vprelovac authored Oct 26, 2023
1 parent 32218b9 commit 4080756
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ from vectordb import Memory
memory = Memory()
# memory.save(texts, metadata, memory_file)
# Memory is where all content you want to store/search goes. Saving to memory is super simple
memory.save("Hello world")
# You can also save content as a list with associated metadata as dict
# You can save a list of items, and associate any kind of metadata with it
memory.save(
["apples", "oranges"],
["apples are green", "oranges are orange"],
[{"url": "https://apples.com"}, {"url": "https://oranges.com"}],
)
# Search for top n relevant chunks
# We will automatically use the fastest vector search backend
# Search for top n relevant results, automatically using embeddings
query = "hello"
results = memory.search(query, top_n=1)
results = memory.search(query, top_n = 1)
print(results)
```

Expand Down

0 comments on commit 4080756

Please sign in to comment.