Skip to content

Commit 5fa5cc3

Browse files
committed
Remove the extra "tools" layer
1 parent 9a89146 commit 5fa5cc3

File tree

16 files changed

+18
-18
lines changed

16 files changed

+18
-18
lines changed

examples/customize/llms/openai_tool_calls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from neo4j_graphrag.llm import OpenAILLM
1919
from neo4j_graphrag.llm.types import ToolCallResponse
20-
from neo4j_graphrag.tools.tool import (
20+
from neo4j_graphrag.tool import (
2121
Tool,
2222
ObjectParameter,
2323
StringParameter,

examples/customize/llms/vertexai_tool_calls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from neo4j_graphrag.llm import VertexAILLM
1313
from neo4j_graphrag.llm.types import ToolCallResponse
14-
from neo4j_graphrag.tools.tool import (
14+
from neo4j_graphrag.tool import (
1515
Tool,
1616
ObjectParameter,
1717
StringParameter,

examples/retrieve/tools/tools_retriever_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from neo4j_graphrag.retrievers.base import Retriever
3434
from neo4j_graphrag.retrievers.tools_retriever import ToolsRetriever
3535
from neo4j_graphrag.types import RawSearchResult
36-
from neo4j_graphrag.tools.tool import (
36+
from neo4j_graphrag.tool import (
3737
ObjectParameter,
3838
StringParameter,
3939
Tool,

src/neo4j_graphrag/llm/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
DEFAULT_RATE_LIMIT_HANDLER,
2626
)
2727

28-
from neo4j_graphrag.tools.tool import Tool
28+
from neo4j_graphrag.tool import Tool
2929

3030
from .rate_limit import RateLimitHandler
3131

src/neo4j_graphrag/llm/openai_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
UserMessage,
4747
)
4848

49-
from neo4j_graphrag.tools.tool import Tool
49+
from neo4j_graphrag.tool import Tool
5050

5151
if TYPE_CHECKING:
5252
from openai.types.chat import (

src/neo4j_graphrag/llm/vertexai_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ToolCallResponse,
3333
)
3434
from neo4j_graphrag.message_history import MessageHistory
35-
from neo4j_graphrag.tools.tool import Tool
35+
from neo4j_graphrag.tool import Tool
3636
from neo4j_graphrag.types import LLMMessage
3737

3838
try:

src/neo4j_graphrag/retrievers/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from neo4j_graphrag.utils import driver_config
4545

4646
if TYPE_CHECKING:
47-
from neo4j_graphrag.tools.tool import (
47+
from neo4j_graphrag.tool import (
4848
ObjectParameter,
4949
Tool,
5050
ToolParameter,
@@ -214,7 +214,7 @@ def _infer_parameters_from_signature(
214214
) -> "ObjectParameter":
215215
"""Infer parameters from the get_search_results method signature."""
216216
# Import here to avoid circular imports
217-
from neo4j_graphrag.tools.tool import (
217+
from neo4j_graphrag.tool import (
218218
ObjectParameter,
219219
)
220220

@@ -270,7 +270,7 @@ def _create_tool_parameter_from_type(
270270
) -> Optional["ToolParameter"]:
271271
"""Create a tool parameter from a type annotation."""
272272
# Import here to avoid circular imports
273-
from neo4j_graphrag.tools.tool import (
273+
from neo4j_graphrag.tool import (
274274
StringParameter,
275275
IntegerParameter,
276276
NumberParameter,
@@ -423,7 +423,7 @@ def convert_to_tool(
423423
Tool: A Tool object configured to use this retriever's search functionality.
424424
"""
425425
# Import here to avoid circular imports
426-
from neo4j_graphrag.tools.tool import Tool
426+
from neo4j_graphrag.tool import Tool
427427

428428
# Get parameters from the retriever with custom descriptions
429429
parameters = self.get_parameters(parameter_descriptions or {})

src/neo4j_graphrag/retrievers/tools_retriever.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from neo4j_graphrag.llm.base import LLMInterface
2222
from neo4j_graphrag.retrievers.base import Retriever
2323
from neo4j_graphrag.types import RawSearchResult
24-
from neo4j_graphrag.tools.tool import Tool
24+
from neo4j_graphrag.tool import Tool
2525
from neo4j_graphrag.types import LLMMessage
2626

2727

tests/unit/llm/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from neo4j_graphrag.tools.tool import Tool, ObjectParameter, StringParameter
3+
from neo4j_graphrag.tool import Tool, ObjectParameter, StringParameter
44

55

66
class TestTool(Tool):

0 commit comments

Comments
 (0)