Skip to content

Commit 4df59e7

Browse files
authored
Add function to create embeddings from text list
1 parent 1efc19c commit 4df59e7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import request
2+
3+
def create_embeddings(list_text):
4+
res = requests.post("http://localhost:11434/api/embed", json={"model": "bge-m3", "input": list_text})
5+
6+
embedding = res.json()['embeddings']
7+
return embedding

0 commit comments

Comments
 (0)