You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`all_questions` is a list of the questions passed to Harmony, in order.
92
92
*`similarity` is the similarity matrix returned by Harmony.
93
93
*`query_similarity` is the degree of similarity of each item to an optional query passed as argument to `match_instruments`.
94
+
95
+
## Using a different vectorisation function
96
+
97
+
Harmony defaults to `sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2` ([HuggingFace link](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)). However you can use other sentence transformers from HuggingFace by setting the environment `HARMONY_SENTENCE_TRANSFORMER_PATH` before importing Harmony:
Any word vector representation can be used by Harmony. The below example works for OpenAI's [text-embedding-ada-002](https://openai.com/blog/new-and-improved-embedding-model) model as of July 2023, provided you have create a paid OpenAI account. However, since LLMs are progressing rapidly, we have chosen not to integrate Harmony directly into the OpenAI client libraries, but instead allow you to pass Harmony any vectorisation function of your choice.
106
+
107
+
```
108
+
import openai
109
+
import numpy as np
110
+
from harmony import match_instruments_with_function, example_instruments
0 commit comments