Skip to content

Commit 8a32f3d

Browse files
committed
TR updates, second round
1 parent afc6aba commit 8a32f3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python-llamaindex/demo_ollama.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
reader = SimpleDirectoryReader(input_files=["./data/pep8.rst"])
66
documents = reader.load_data()
77

8-
embed_model = OllamaEmbedding(model_name="embeddinggemma")
8+
embed_model = OllamaEmbedding(
9+
model_name="embeddinggemma",
10+
request_timeout=60.0, # For low-performance hardware
11+
context_window=8000, # For reducing memory usage
12+
)
913
index = VectorStoreIndex.from_documents(documents, embed_model=embed_model)
1014

1115
llm = Ollama(model="llama3.2")

0 commit comments

Comments
 (0)