Skip to content

Instantly share code, notes, and snippets.

@pablocastro
Last active August 9, 2024 21:12
Show Gist options
  • Save pablocastro/90677135ddbd1f8a4783006f6e890edf to your computer and use it in GitHub Desktop.
Save pablocastro/90677135ddbd1f8a4783006f6e890edf to your computer and use it in GitHub Desktop.
Examples from the Microsoft Mechanics show for vector search, hybrid search, and semantic ranking using Azure Search
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manojgan
Copy link

I'm getting the following error in my Python Notebook on the following line of code

"from openai.embeddings_utils import cosine_similarity, get_embedding"

Error : Import "openai.embeddings_utils" could not be resolved Pylance (reportMissingImports)

Any guidance on resolving this in VSCode is much appreciated.

Thanks

@pablocastro
Copy link
Author

@manojgan: The new versions of the Python library for OpenAI no longer have embedding_utils. I'll update this gist so it doesn't depend on it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment