Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Llm-463 - Fixed unit tests adding mocks to avoid making actual requests ✨ #18

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

javiertoledo
Copy link
Member

@javiertoledo javiertoledo commented Aug 30, 2023

Warning: #20 should be merged first!

  • Mocked the OpenAiService object to test the generateEmbedding method in the OpenAIEmbeddingsModel class.
  • Improved the test to check for the new Embedding structure and expected metadata.
  • Mocked OkHttpClient to implement positive and negative requests to the Pinecone API.
  • Completed tests for store and similaritySearch methods in the class PineconeEmbeddingsStore.

I've also checked that all tests are run with the command ./gradlew test, so we should be able to easily run the test suite in a github action.

Copy link
Member

@juanjoman juanjoman left a comment

Choose a reason for hiding this comment

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

Left some comments, mostly about simplifying the mocks. If we're in a rush to finish this I'm ok with it 😄

@javiertoledo javiertoledo changed the base branch from main to get_delete_embeddings_space August 31, 2023 17:38
Copy link
Member

@juanjoman juanjoman left a comment

Choose a reason for hiding this comment

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

LGTM!!

Base automatically changed from get_delete_embeddings_space to main September 1, 2023 09:29
@juanjoman juanjoman merged commit fa1a8f7 into main Sep 1, 2023
2 checks passed
@juanjoman juanjoman deleted the llm-463/unit-tests branch September 1, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants