openai-cookbook
openai-cookbook copied to clipboard
Fix error in compute_doc_embeddings example to return expected value/shape in Question_answering_using_embeddings.ipynb
From reading the code sample in the notebook below this change I can see that these 2 functions (compute_doc_embeddings and load_embeddings) were supposed to return the same "shape". This PR is to fix this issue that may not be noticed because the code calling compute_doc_embeddings is commented out.
document_embeddings = load_embeddings("https://cdn.openai.com/API/examples/data/olympics_sections_document_embeddings.csv")
# ===== OR, uncomment the below line to recaculate the embeddings from scratch. ========
# document_embeddings = compute_doc_embeddings(df)
I will take a look at this - thanks!
I'm doing a full rewrite of this example and will fix this up.
Fixed!
Awesome, thanks for such a great write up! So helpful!