nreimers commited on
Commit
f0c8244
1 Parent(s): ccab89a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -1366,7 +1366,7 @@ index.add(np.arange(len(doc_embeddings)), doc_embeddings)
1366
 
1367
  #Searching
1368
  query = 'Who was Alan Turing'
1369
- query_emb = co.embed([query], model="embed-multilingual-v3.0", input_type="search_query", embedding_types=["int8"]).embeddings
1370
  query_emb = np.asarray(query_emb.int8, dtype='int8')
1371
 
1372
  #Search on the index and get top-10 results
@@ -1417,7 +1417,7 @@ index.add(doc_embeddings)
1417
  #Search
1418
  def search(index, query, top_k=10):
1419
  # Make sure to set input_type="search_query"
1420
- query_emb = co.embed([query], model="embed-multilingual-v3.0", input_type="search_query", embedding_types=["ubinary", "float"]).embeddings
1421
  query_emb_bin = np.asarray(query_emb.ubinary, dtype='uint8')
1422
  query_emb_float = np.asarray(query_emb.float, dtype="float32")
1423
 
@@ -1777,7 +1777,7 @@ The following table contains all language codes together with the total numbers
1777
  | kg | 609 |
1778
  | pih | 606 |
1779
  | ch | 513 |
1780
- | bug | 429 |
1781
  | ty | 297 |
1782
  | ik | 275 |
1783
  | iu | 263 |
 
1366
 
1367
  #Searching
1368
  query = 'Who was Alan Turing'
1369
+ query_emb = co.embed(texts=[query], model="embed-multilingual-v3.0", input_type="search_query", embedding_types=["int8"]).embeddings
1370
  query_emb = np.asarray(query_emb.int8, dtype='int8')
1371
 
1372
  #Search on the index and get top-10 results
 
1417
  #Search
1418
  def search(index, query, top_k=10):
1419
  # Make sure to set input_type="search_query"
1420
+ query_emb = co.embed(texts=[query], model="embed-multilingual-v3.0", input_type="search_query", embedding_types=["ubinary", "float"]).embeddings
1421
  query_emb_bin = np.asarray(query_emb.ubinary, dtype='uint8')
1422
  query_emb_float = np.asarray(query_emb.float, dtype="float32")
1423
 
 
1777
  | kg | 609 |
1778
  | pih | 606 |
1779
  | ch | 513 |
1780
+ | bug | 429 |emb
1781
  | ty | 297 |
1782
  | ik | 275 |
1783
  | iu | 263 |