Spaces:
Sleeping
Sleeping
Priyansh Saxena commited on
Commit ·
1691b3a
1
Parent(s): f767590
Fix: Resolve all import errors and dependency issues
Browse files- Fix langchain imports: memory and tools now from langchain_community
- Add missing 'requests' package to requirements
- Correct google-generativeai package name in pyproject.toml
- Sync requirements.txt and pyproject.toml dependencies
- Remove unused packages (gradio, streamlit, trafilatura) from pyproject.toml
- pyproject.toml +5 -4
- requirements.txt +1 -0
- src/agent/memory_manager.py +1 -1
- src/agent/research_agent.py +1 -1
- src/tools/base_tool.py +1 -1
- src/tools/chart_creator_tool.py +1 -1
- src/tools/chart_data_tool.py +1 -1
pyproject.toml
CHANGED
|
@@ -7,8 +7,9 @@ dependencies = [
|
|
| 7 |
"aiohttp>=3.12.15",
|
| 8 |
"asyncio-throttle>=1.0.2",
|
| 9 |
"diskcache>=5.6.3",
|
| 10 |
-
"
|
| 11 |
-
"
|
|
|
|
| 12 |
"langchain>=0.3.27",
|
| 13 |
"langchain-community>=0.3.27",
|
| 14 |
"langchain-google-genai>=2.1.9",
|
|
@@ -18,7 +19,7 @@ dependencies = [
|
|
| 18 |
"pydantic>=2.11.7",
|
| 19 |
"python-dateutil>=2.9.0.post0",
|
| 20 |
"python-dotenv>=1.1.1",
|
| 21 |
-
"
|
| 22 |
"tenacity>=9.1.2",
|
| 23 |
-
"
|
| 24 |
]
|
|
|
|
| 7 |
"aiohttp>=3.12.15",
|
| 8 |
"asyncio-throttle>=1.0.2",
|
| 9 |
"diskcache>=5.6.3",
|
| 10 |
+
"fastapi>=0.100.0",
|
| 11 |
+
"google-generativeai>=0.3.0",
|
| 12 |
+
"jinja2>=3.0.0",
|
| 13 |
"langchain>=0.3.27",
|
| 14 |
"langchain-community>=0.3.27",
|
| 15 |
"langchain-google-genai>=2.1.9",
|
|
|
|
| 19 |
"pydantic>=2.11.7",
|
| 20 |
"python-dateutil>=2.9.0.post0",
|
| 21 |
"python-dotenv>=1.1.1",
|
| 22 |
+
"requests>=2.31.0",
|
| 23 |
"tenacity>=9.1.2",
|
| 24 |
+
"uvicorn>=0.24.0",
|
| 25 |
]
|
requirements.txt
CHANGED
|
@@ -14,3 +14,4 @@ plotly
|
|
| 14 |
pandas
|
| 15 |
numpy
|
| 16 |
jinja2
|
|
|
|
|
|
| 14 |
pandas
|
| 15 |
numpy
|
| 16 |
jinja2
|
| 17 |
+
requests
|
src/agent/memory_manager.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from
|
| 2 |
from typing import Dict, Any, List, Optional
|
| 3 |
|
| 4 |
class MemoryManager:
|
|
|
|
| 1 |
+
from langchain_community.memory import ConversationBufferWindowMemory
|
| 2 |
from typing import Dict, Any, List, Optional
|
| 3 |
|
| 4 |
class MemoryManager:
|
src/agent/research_agent.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 2 |
from langchain_community.llms import Ollama
|
| 3 |
-
from
|
| 4 |
from typing import List, Dict, Any
|
| 5 |
import asyncio
|
| 6 |
from datetime import datetime
|
|
|
|
| 1 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 2 |
from langchain_community.llms import Ollama
|
| 3 |
+
from langchain_community.memory import ConversationBufferWindowMemory
|
| 4 |
from typing import List, Dict, Any
|
| 5 |
import asyncio
|
| 6 |
from datetime import datetime
|
src/tools/base_tool.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
from abc import ABC, abstractmethod
|
| 2 |
from typing import Dict, Any, Optional, Union
|
| 3 |
-
from
|
| 4 |
from pydantic import BaseModel, Field, PrivateAttr, field_validator
|
| 5 |
import asyncio
|
| 6 |
import aiohttp
|
|
|
|
| 1 |
from abc import ABC, abstractmethod
|
| 2 |
from typing import Dict, Any, Optional, Union
|
| 3 |
+
from langchain_community.tools import BaseTool
|
| 4 |
from pydantic import BaseModel, Field, PrivateAttr, field_validator
|
| 5 |
import asyncio
|
| 6 |
import aiohttp
|
src/tools/chart_creator_tool.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from
|
| 2 |
from pydantic import BaseModel, Field
|
| 3 |
from typing import Dict, Any, List, Optional
|
| 4 |
import json
|
|
|
|
| 1 |
+
from langchain_community.tools import BaseTool
|
| 2 |
from pydantic import BaseModel, Field
|
| 3 |
from typing import Dict, Any, List, Optional
|
| 4 |
import json
|
src/tools/chart_data_tool.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from
|
| 2 |
from pydantic import BaseModel, Field
|
| 3 |
from typing import Dict, Any, List, Optional
|
| 4 |
import json
|
|
|
|
| 1 |
+
from langchain_community.tools import BaseTool
|
| 2 |
from pydantic import BaseModel, Field
|
| 3 |
from typing import Dict, Any, List, Optional
|
| 4 |
import json
|