Skip to content

Commit

Permalink
edit index_nodes log to print both models
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantisan committed Sep 23, 2023
1 parent d497c3f commit de1657c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mind_palace/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@

@time_function
def index_nodes(nodes, model="gpt-3.5-turbo"):
embed_model = "local"
service_context = li.ServiceContext.from_defaults(
llm=OpenAI(model=model),
embed_model="local"
embed_model=embed_model
# Q: how much does a better embedding model help?
)

print(f"Creating an index with {len(nodes)} number of nodes using model {model}")
print(
f"Creating an index with {len(nodes)} number of nodes using embedding model {embed_model} and querying LLM {model}"
)
index = li.VectorStoreIndex(nodes, service_context=service_context)

return index

0 comments on commit de1657c

Please sign in to comment.