shreyas-vstackai commited on
Commit
dba3bd8
1 Parent(s): a228e7b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -2364,7 +2364,7 @@ documents = [
2364
 
2365
  # Get embeddings for the legal documents
2366
  doc_embeddings = client.embed(texts=documents, model='vstackai-law-1', is_query=False) # EmbeddingsObject(num_embeddings=3, embedding_dims=1536)
2367
- doc_embeddings = np.array(doc_embeddings.embeddings)
2368
 
2369
  # Encode the query
2370
  query = "How many days does the consumer have to return the product?"
@@ -2374,7 +2374,7 @@ query_embedding = client.embed(
2374
  is_query=True,
2375
  instruction='Represent the query for searching legal documents'
2376
  ) # EmbeddingsObject(num_embeddings=1, embedding_dims=1536)
2377
- query_embedding = np.array(query_embedding.embeddings) # (1, 1536)
2378
 
2379
  # To check if the embeddings work, you can compute similarity between the query and documents
2380
  similarities = np.dot(doc_embeddings, query_embedding.T)
 
2364
 
2365
  # Get embeddings for the legal documents
2366
  doc_embeddings = client.embed(texts=documents, model='vstackai-law-1', is_query=False) # EmbeddingsObject(num_embeddings=3, embedding_dims=1536)
2367
+ doc_embeddings = doc_embeddings.embeddings # (3, 1536) numpy array
2368
 
2369
  # Encode the query
2370
  query = "How many days does the consumer have to return the product?"
 
2374
  is_query=True,
2375
  instruction='Represent the query for searching legal documents'
2376
  ) # EmbeddingsObject(num_embeddings=1, embedding_dims=1536)
2377
+ query_embedding = query_embedding.embeddings # (1, 1536) numpy array
2378
 
2379
  # To check if the embeddings work, you can compute similarity between the query and documents
2380
  similarities = np.dot(doc_embeddings, query_embedding.T)