graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

add embedder tests

Open evanmschultz opened this issue 8 months ago • 1 comments

Add Tests for Embedder Implementations

Changes

  • Added test suite for OpenAI, Gemini, and VoyageAI embedder implementations
  • Created test fixtures to generate mock embedding values
  • Implemented tests for both single and batch embedding operations

Technical Details

  • Added test files:
    • embedder_fixtures.py: Utility function for creating mock embedding values
    • test_openai.py: Tests for OpenAI embedder
    • test_gemini.py: Tests for Gemini embedder
    • test_voyage.py: Tests for VoyageAI embedder
  • Each test file includes:
    • Mock responses for API clients
    • Tests for API parameter validation
    • Tests for proper response processing
    • Tests for both single and batch embedding methods

I have read the CLA Document and I hereby sign the CLA


[!IMPORTANT] Add tests for OpenAI, Gemini, and VoyageAI embedders, including single and batch operations, with mock API interactions.

  • Tests:
    • Added test_openai.py, test_gemini.py, test_voyage.py for OpenAI, Gemini, and VoyageAI embedders.
    • Each test file includes tests for single and batch embedding operations, API parameter validation, and response processing.
    • Utilizes mock responses and clients to simulate API interactions.
  • Fixtures:
    • Added embedder_fixtures.py for creating mock embedding values.
    • Provides utility function create_embedding_values() for generating mock data.

This description was created by Ellipsis for c7af153d7185ee42351a04713ed7a5d6052184bf. You can customize this summary. It will automatically update as commits are pushed.

evanmschultz avatar May 01 '25 23:05 evanmschultz

Partially addresses issue #375

evanmschultz avatar May 01 '25 23:05 evanmschultz