mirror of
https://github.com/microsoft/graphrag.git
synced 2025-07-31 12:52:22 +00:00
14 lines
365 B
Python
14 lines
365 B
Python
# Copyright (c) 2024 Microsoft Corporation.
|
|
# Licensed under the MIT License
|
|
from fnllm.types import ChatLLM
|
|
from pydantic import BaseModel
|
|
|
|
from graphrag.index.llm.mock_llm import MockChatLLM
|
|
|
|
|
|
def create_mock_llm(
|
|
responses: list[str | BaseModel],
|
|
) -> ChatLLM:
|
|
"""Creates a mock LLM that returns the given responses."""
|
|
return MockChatLLM(responses)
|