Zack Saadioui
8/27/2024
1
mxbai-embed-large
1
nomic-embed-text
1
all-minilm
1
2
bash
pip install ollama
1
2
bash
ollama --version
1
mxbai-embed-large
1
2
bash
ollama pull mxbai-embed-large
1
2
3
4
python
import chromadb
client = chromadb.Client()
collection = client.create_collection(name="genomic_docs")
1
2
3
4
python
for i, seq in enumerate(sequences):
embedding = ollama.embeddings(model="mxbai-embed-large", prompt=seq)["embedding"]
collection.add(ids=[str(i)], embeddings=[embedding], documents=[seq])
1
2
3
4
5
6
python
prompt = "Find similar sequences to ATGCGAATTCAGATCG" # Your search prompt
response = ollama.embeddings(prompt=prompt, model="mxbai-embed-large")
results = collection.query(query_embeddings=[response["embedding"]], n_results=5)
for doc in results['documents']:
print(doc)
1
/v1/embeddings
Copyright © Arsturn 2024