Skip to content

Conversation

willtai
Copy link
Contributor

@willtai willtai commented Jul 9, 2024

Description

This PR fixes a few issues regarding using the package's OpenAIEmbedding class:

  • Allow embedding model name to be specified correctly and used
  • Removed sentence_transformers from embeddings/__init__.py to avoid ImportError if sentence_transformers` package is not installed, which is meant to be an optional dependency.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@willtai willtai marked this pull request as ready for review July 9, 2024 16:02
@willtai willtai requested a review from a team July 9, 2024 16:02
@willtai willtai changed the title Openai embeddings init Fix import and init issue with using OpenAIEmbeddings Jul 9, 2024
@willtai
Copy link
Contributor Author

willtai commented Jul 9, 2024

@CodiumAI-Agent /update_changelog

@CodiumAI-Agent
Copy link

Changelog updates: 🔄

2024-07-09

Fixed

  • Resolved import issues with OpenAIEmbeddings class.
  • Corrected initialization to allow specifying the embedding model name.
  • Removed sentence_transformers from embeddings/__init__.py to avoid ImportError when the package is not installed.

to commit the new content to the CHANGELOG.md file, please type:
'/update_changelog --pr_update_changelog.push_changelog_changes=true'

Copy link
Contributor

@stellasia stellasia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes!

@willtai willtai force-pushed the openai-embeddings-init branch from bdd87b4 to 9dd967c Compare July 9, 2024 16:12
@willtai willtai merged commit ff4ed5a into neo4j:main Jul 9, 2024
@willtai willtai deleted the openai-embeddings-init branch October 1, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants