Skip to content

Commit

Permalink
Merge pull request #8 from ofek/patch-1
Browse files Browse the repository at this point in the history
Add syntax highlighting to code samples
  • Loading branch information
vprelovac authored Nov 26, 2023
2 parents 947f6ee + 8023077 commit 8ace1fe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pip install vectordb2

Quick example that loads data into memory, and runs retrieval. All data will be handled locally, including embeddings and vector search, completely trasparent for the user with maximum possible performance.

```
```python
from vectordb import Memory

# Memory is where all content you want to store/search goes.
Expand All @@ -41,15 +41,14 @@ print(results)

This returns the chunks with the added metadata and the vector distance (where 0 is the exact match and higher means further apart)

```
```json
[
{
"chunk": "apples are green",
"metadata": {"url": "https://apples.com"},
"distance": 0.87
}
]
```

## Options
Expand Down Expand Up @@ -105,7 +104,7 @@ Prints the contents of the memory.

## Example

```
```python
from vectordb import Memory

memory = Memory(
Expand Down Expand Up @@ -185,7 +184,7 @@ print(results)
```

Output:
```
```json
[
{
"chunk": "Artificial intelligence (AI) is the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The term may also be applied to any machine that exhibits traits associated with a human mind such as learning and problem-solving. AI research has been highly successful in developing effective techniques for solving a wide range of problems, from game playing to medical diagnosis. However, there is still a long way to go before AI can truly match the intelligence of humans. One of the main challenges is that human intelligence is incredibly complex and poorly understood. Despite the challenges, AI is a rapidly growing field with the potential to revolutionize many aspects of our lives. Some of the potential benefits of AI include: Increased",
Expand Down

0 comments on commit 8ace1fe

Please sign in to comment.