This pull request includes improvements to the computation of cosine similarity in the similarity method across two files to enhance numerical stability and precision.
Changes to cosine similarity computation:
src/chonkie/embeddings/model2vec.py: Modified the similarity method to use np.divide for computing the cosine similarity between two embeddings.
src/chonkie/embeddings/openai.py: Updated the similarity method to use np.divide for computing the cosine similarity between two embeddings.
This pull request includes improvements to the computation of cosine similarity in the
similarity
method across two files to enhance numerical stability and precision.Changes to cosine similarity computation:
src/chonkie/embeddings/model2vec.py
: Modified thesimilarity
method to usenp.divide
for computing the cosine similarity between two embeddings.src/chonkie/embeddings/openai.py
: Updated thesimilarity
method to usenp.divide
for computing the cosine similarity between two embeddings.