I keep running into this error when trying to calculate cosine similarity between my search query and embeddings:
ufunc 'multiply' did not contain a loop with signature matching types (dtype('<U34382'), dtype('<U23')) -> None
This is part of the code:
embedding = get_embedding(
search_query,
engine="text-embedding-ada-002"
)
df["similarities"] = df.ada_search.apply(lambda x: cosine_similarity(x, embedding)) # Errors here
Any ideas?