-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Description
Hello,
I've been following the example provided at: https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb
Unfortunately when I get to In [6] I continually obtain the following error in the code:
TypeError Traceback (most recent call last)
in
----> 1 def get_embedding(text: str, model: str=EMBEDDING_MODEL) -> list[float]:
2 result = openai.Embedding.create(
3 model=model,
4 input=text
5 )
TypeError: 'type' object is not subscriptable
Any recommendations on how to fix this would be much appreciated, as I can't seem to find an answer on Stack Overflow.
Thanks so much for your help!
Metadata
Metadata
Assignees
Labels
No labels