Skip to content

Commit dff93ea

Browse files
committed
+ linting and type fixes
1 parent 2ac3edf commit dff93ea

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

python/packages/autogen-ext/src/autogen_ext/tools/graphrag/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from ._config import (
2-
EmbeddingConfig,
32
GlobalContextConfig,
43
GlobalDataConfig,
54
LocalContextConfig,
@@ -23,5 +22,4 @@
2322
"LocalSearchToolReturn",
2423
"MapReduceConfig",
2524
"SearchConfig",
26-
"EmbeddingConfig",
2725
]

python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_config.py

-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from typing import Callable, Literal, Optional
2-
31
from pydantic import BaseModel
42

53

@@ -59,16 +57,3 @@ class SearchConfig(BaseModel):
5957
max_tokens: int = 1500
6058
temperature: float = 0.0
6159
response_type: str = "multiple paragraphs"
62-
63-
64-
class EmbeddingConfig(BaseModel):
65-
api_key: Optional[str] = None
66-
model: str
67-
api_base: Optional[str] = None
68-
deployment_name: Optional[str] = None
69-
api_version: Optional[str] = None
70-
api_type: Literal["azure", "openai"] = "openai"
71-
organization: Optional[str] = None
72-
azure_ad_token_provider: Optional[Callable[[], str]] = None
73-
max_retries: int = 10
74-
request_timeout: float = 180.0

python/packages/autogen-ext/tests/tools/test_graphrag_tools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def agenerate(
3939
) -> str:
4040
return "Mock response"
4141

42-
async def astream_generate(
42+
async def astream_generate( # type: ignore
4343
self, messages: str | list[Any], callbacks: list[BaseLLMCallback] | None = None, **kwargs: Any
4444
) -> AsyncGenerator[str, None]:
4545
yield "Mock response"

0 commit comments

Comments
 (0)