Skip to content

Commit

Permalink
* chore(docs/index.md): update example documents and comments in code
Browse files Browse the repository at this point in the history
* feat(docs/index.md): add support for passage and query prefixes in example documents
  • Loading branch information
NirantK committed Aug 22, 2023
1 parent 9a944e4 commit c302311
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ pip install fastembed
from fastembed.embedding import DefaultEmbedding

documents: List[str] = [
"Hello, World!",
"This is an example document.",
"fastembed is supported by and maintained by Qdrant." * 128,
"passage: Hello, World!",
"query: Hello, World!", # these are two different embedding
"passage: This is an example document.",
"fastembed is supported by and maintained by Qdrant." # You can leave out the prefix but it's recommended
]
embedding_model = DeafultEmbedding()
embeddings: List[np.ndarray] = list(embedding_model.encode(documents))
Expand Down

0 comments on commit c302311

Please sign in to comment.