Skip to content

Commit

Permalink
Updated LLMMessage deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexthomas93 committed Feb 24, 2025
1 parent 9d40495 commit c7b371a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/neo4j_graphrag/llm/types.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import warnings
from typing import Literal
from typing import Any, Literal

from pydantic import BaseModel

from neo4j_graphrag.types import LLMMessage as _LLMMessage

warnings.warn(
"LLMMessage has been moved to neo4j_graphrag.types. Please update your imports.",
DeprecationWarning,
stacklevel=2,
)
LLMMessage = _LLMMessage

def __getattr__(name: str) -> Any:
if name == "LLMMessage":
warnings.warn(
"LLMMessage has been moved to neo4j_graphrag.types. Please update your imports.",
DeprecationWarning,
stacklevel=2,
)
return _LLMMessage
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


class LLMResponse(BaseModel):
Expand Down

0 comments on commit c7b371a

Please sign in to comment.