Skip to content

Commit deb3176

Browse files
author
SDLC Bot
committed
chore: move test_results into test/ directory
1 parent 18310da commit deb3176

25 files changed

+26
-12
lines changed

src/agents/deepagent.py

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1+
"""LangChain agent integration using OpenAI LLM and standard tools."""
12

2-
"""
3-
LangChain agent integration using OpenAI LLM and standard tools.
4-
"""
3+
from typing import Any, Optional, List
54

65
from langchain.agents import initialize_agent, AgentType
76

8-
# LLM imports for dynamic selection
7+
# LLM names declared as Any so mypy accepts fallback to None if imports fail
8+
GoogleGenerativeAI: Any
9+
OpenAI: Any
10+
Ollama: Any
11+
912
try:
10-
from langchain_google_genai.llms import GoogleGenerativeAI
13+
from langchain_google_genai.llms import GoogleGenerativeAI # type: ignore
1114
except Exception:
1215
GoogleGenerativeAI = None
1316

1417
try:
15-
from langchain_community.llms import OpenAI
18+
from langchain_community.llms import OpenAI # type: ignore
1619
except Exception:
1720
OpenAI = None
1821

1922
try:
20-
from langchain_community.llms import Ollama
23+
from langchain_community.llms import Ollama # type: ignore
2124
except Exception:
2225
Ollama = None
2326

@@ -43,12 +46,12 @@ class SDLCFlexibleAgent:
4346
def __init__(
4447
self,
4548
provider: str,
46-
api_key: str = None,
47-
model: str = None,
48-
tools=None,
49+
api_key: Optional[str] = None,
50+
model: Optional[str] = None,
51+
tools: Optional[List[Any]] = None,
4952
dry_run: bool = False,
5053
**kwargs,
51-
):
54+
) -> None:
5255
"""
5356
provider: 'gemini', 'openai', 'ollama', etc.
5457
api_key: API key for the provider (if required)
@@ -58,6 +61,9 @@ def __init__(
5861
"""
5962
provider = provider.lower()
6063
self.dry_run = bool(dry_run)
64+
# typed instance attributes for mypy
65+
self.llm: Any = None
66+
self.agent: Any = None
6167
# In dry-run mode, avoid creating real LLMs or network calls
6268
if self.dry_run:
6369
# Use a no-network mock LLM and a MockAgent below
@@ -86,6 +92,7 @@ def __init__(
8692
self.tools = [EchoTool()]
8793
else:
8894
self.tools = tools
95+
# initialize_agent returns an executor; keep as Any for flexibility in dry-run tests
8996
self.agent = initialize_agent(
9097
self.tools,
9198
self.llm,

src/fallback/fallback_router.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""
2+
Fallback router module (renamed from router.py to avoid duplicate-module name with llm/router.py).
3+
4+
This placeholder keeps a clear name for fallback routing logic.
5+
"""
6+
7+
__all__: list[str] = []

src/llm/llm_router.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"""
77

88
# Placeholder implementation — keep module importable for now.
9-
__all__ = []
9+
__all__: list[str] = []
File renamed without changes.

0 commit comments

Comments
 (0)