# Because the texts being embedded are the chunks we are searching over, we set the input type as search_doc
model = "embed-v4.0"

def batch_embed(texts, batch_size=96):
    all_embeddings = []
    for i in range(0, len(texts), batch_size):
        batch = texts[i:i+batch_size]
        response = co.embed(
            texts=batch,
            model=model,
            input_type="search_document",
            embedding_types=['float']
        )
        all_embeddings.extend(response.embeddings.float)
    return all_embeddings

embeddings = batch_embed(chunks)
print(f"We just computed {len(embeddings)} embeddings.")
```

```txt title="Output"
We just computed 115 embeddings.
```

### Store the embeddings in a vector database

We use the simplest vector database ever: a python dictionary using `np.array()`.

```python PYTHON
!pip install numpy --quiet
```

```python PYTHON
import numpy as np
vector_database = {i: np.array(embedding) for i, embedding in enumerate(embeddings)}