Spaces:
Sleeping
Sleeping
tamas.kiss
commited on
Commit
•
e0951b5
1
Parent(s):
8b9bffd
Bugfix in create embeddings
Browse files
app.py
CHANGED
@@ -86,7 +86,7 @@ def cached(func):
|
|
86 |
|
87 |
@cached
|
88 |
def create_embedding(text: str):
|
89 |
-
embed_text = openai.embeddings.create(input=text, model="text-embedding-ada-002"
|
90 |
|
91 |
return embed_text.tolist()
|
92 |
|
|
|
86 |
|
87 |
@cached
|
88 |
def create_embedding(text: str):
|
89 |
+
embed_text = openai.embeddings.create(input=text, model="text-embedding-ada-002").data[0].embedding
|
90 |
|
91 |
return embed_text.tolist()
|
92 |
|