openai-cookbook
openai-cookbook copied to clipboard
QA using Embeddings: Issues running code
I've tried running the "Question Answering using Embeddings" code.
But in the embedding section (starting at def get_embedding
) I run into an error that I haven't been able to fix: TypeError: 'type' object is not subscriptable
.
Any suggestions on how to solve this issue?
Option 1: Use a newer version of Python (3.9+).
Option 2: Delete the type hints in the function definitions.
The error is coming from the type hints; e.g., "-> List[int]".