graphrag/tests/__init__.py

16 lines
506 B
Python
Raw Permalink Normal View History

2024-07-01 15:25:30 -06:00
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License
"""Tests for the GraphRAG LLM module."""
# Register MOCK providers
from graphrag.config.enums import ModelType
from graphrag.language_model.factory import ModelFactory
from tests.mock_provider import MockChatLLM, MockEmbeddingLLM
ModelFactory.register_chat(ModelType.MockChat, lambda **kwargs: MockChatLLM(**kwargs))
ModelFactory.register_embedding(
ModelType.MockEmbedding, lambda **kwargs: MockEmbeddingLLM(**kwargs)
)