Skip to content

Commit 19ebd13

Browse files
istranicalgitbook-bot
authored andcommitted
GITBOOK-19: change request with no subject merged in GitBook
1 parent 79c3714 commit 19ebd13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def embedding_function(texts, model="text-embedding-ada-002"):
5959
texts = [texts]
6060

6161
texts = [t.replace("\n", " ") for t in texts]
62-
return [data['embedding']for data in openai.Embedding.create(input = texts, model=model)['data']]
62+
return [data.embedding for data in openai.embeddings.create(input = texts, model=model).data]
6363
```
6464

6565
Finally, let's create the Deep Lake Vector Store and populate it with data. We use a default tensor configuration, which creates tensors with `text (str)`, `metadata(json)`, `id (str, auto-populated)`, `embedding (float32)`. [Learn more about tensor customizability here.](getting-started/vector-store/step-4-customizing-vector-stores.md) 

0 commit comments

Comments
 (0)