Spaces:
Sleeping
Sleeping
SAAHMATHWORKS
commited on
Commit
·
3e14b58
1
Parent(s):
afbbb2b
fix sys path
Browse files- core/assistance/email_service.py +4 -0
- core/assistance/workflow_nodes.py +4 -0
- core/chat_manager.py +5 -0
- core/conversation_repair.py +4 -0
- core/email_tool.py +4 -0
- core/graph_builder.py +5 -0
- core/human_approval_node.py +5 -0
- core/nodes/base_node.py +4 -0
- core/nodes/helper_nodes.py +5 -0
- core/nodes/response_nodes.py +5 -0
- core/nodes/retrieval_nodes.py +5 -0
- core/nodes/routing_nodes.py +5 -0
- core/retriever.py +4 -0
- core/router.py +5 -0
- core/routing/routing_logic.py +4 -0
- core/system_initializer.py +6 -0
- main.py +4 -0
core/assistance/email_service.py
CHANGED
|
@@ -2,6 +2,10 @@
|
|
| 2 |
"""
|
| 3 |
Wrapper for email functionality - provides a consistent interface
|
| 4 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
import re
|
| 6 |
import logging
|
| 7 |
from typing import Optional, Dict
|
|
|
|
| 2 |
"""
|
| 3 |
Wrapper for email functionality - provides a consistent interface
|
| 4 |
"""
|
| 5 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 6 |
+
import sys
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 9 |
import re
|
| 10 |
import logging
|
| 11 |
from typing import Optional, Dict
|
core/assistance/workflow_nodes.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
# core/assistance/workflow_nodes.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
import re
|
| 4 |
from typing import Dict, Any, List
|
|
|
|
| 1 |
# core/assistance/workflow_nodes.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
import logging
|
| 7 |
import re
|
| 8 |
from typing import Dict, Any, List
|
core/chat_manager.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/chat_manager.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import asyncio
|
| 3 |
import logging
|
| 4 |
from datetime import datetime
|
|
|
|
| 1 |
# [file name]: core/chat_manager.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import asyncio
|
| 8 |
import logging
|
| 9 |
from datetime import datetime
|
core/conversation_repair.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
# [file name]: core/conversation_repair.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Dict, List, Optional, Any
|
| 4 |
import re
|
|
|
|
| 1 |
# [file name]: core/conversation_repair.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
import logging
|
| 7 |
from typing import Dict, List, Optional, Any
|
| 8 |
import re
|
core/email_tool.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
# acfai_project/core/email_tool.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import os
|
| 3 |
import smtplib
|
| 4 |
import logging
|
|
|
|
| 1 |
# acfai_project/core/email_tool.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
import os
|
| 7 |
import smtplib
|
| 8 |
import logging
|
core/graph_builder.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/graph_builder.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
from langgraph.graph import StateGraph, START, END
|
| 3 |
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
|
| 4 |
import logging
|
|
|
|
| 1 |
# [file name]: core/graph_builder.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
from langgraph.graph import StateGraph, START, END
|
| 8 |
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
|
| 9 |
import logging
|
core/human_approval_node.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# core/human_approval_node.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Literal
|
| 4 |
from langchain_core.runnables import RunnableConfig
|
|
|
|
| 1 |
# core/human_approval_node.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import logging
|
| 8 |
from typing import Literal
|
| 9 |
from langchain_core.runnables import RunnableConfig
|
core/nodes/base_node.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
# [file name]: core/nodes/base_node.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Dict, List, Optional, Any
|
| 4 |
from datetime import datetime
|
|
|
|
| 1 |
# [file name]: core/nodes/base_node.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
import logging
|
| 7 |
from typing import Dict, List, Optional, Any
|
| 8 |
from datetime import datetime
|
core/nodes/helper_nodes.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/nodes/helper_nodes.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Dict, Any, List
|
| 4 |
from langchain_core.runnables import RunnableConfig
|
|
|
|
| 1 |
# [file name]: core/nodes/helper_nodes.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import logging
|
| 8 |
from typing import Dict, Any, List
|
| 9 |
from langchain_core.runnables import RunnableConfig
|
core/nodes/response_nodes.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/nodes/response_nodes.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
import time
|
| 4 |
from datetime import datetime
|
|
|
|
| 1 |
# [file name]: core/nodes/response_nodes.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import logging
|
| 8 |
import time
|
| 9 |
from datetime import datetime
|
core/nodes/retrieval_nodes.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/nodes/retrieval_nodes.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Dict, Any
|
| 4 |
from langchain_core.runnables import RunnableConfig
|
|
|
|
| 1 |
# [file name]: core/nodes/retrieval_nodes.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import logging
|
| 8 |
from typing import Dict, Any
|
| 9 |
from langchain_core.runnables import RunnableConfig
|
core/nodes/routing_nodes.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/nodes/routing_nodes.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Dict, Any
|
| 4 |
from langchain_core.runnables import RunnableConfig
|
|
|
|
| 1 |
# [file name]: core/nodes/routing_nodes.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import logging
|
| 8 |
from typing import Dict, Any
|
| 9 |
from langchain_core.runnables import RunnableConfig
|
core/retriever.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
# core/retriever.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import re
|
| 3 |
import logging
|
| 4 |
import asyncio
|
|
|
|
| 1 |
# core/retriever.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
import re
|
| 7 |
import logging
|
| 8 |
import asyncio
|
core/router.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/router.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import re
|
| 3 |
import logging
|
| 4 |
import json
|
|
|
|
| 1 |
# [file name]: core/router.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import re
|
| 8 |
import logging
|
| 9 |
import json
|
core/routing/routing_logic.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
# [file name]: core/routing/routing_logic.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from typing import Literal
|
| 4 |
from models.state_models import MultiCountryLegalState
|
|
|
|
| 1 |
# [file name]: core/routing/routing_logic.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
import logging
|
| 7 |
from typing import Literal
|
| 8 |
from models.state_models import MultiCountryLegalState
|
core/system_initializer.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
# [file name]: core/system_initializer.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import logging
|
| 3 |
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
|
| 4 |
|
|
@@ -10,6 +15,7 @@ from database.postgres_checkpointer import PostgresCheckpointer
|
|
| 10 |
from langchain_openai import ChatOpenAI
|
| 11 |
from config import settings # Make sure this import is correct
|
| 12 |
|
|
|
|
| 13 |
logger = logging.getLogger(__name__)
|
| 14 |
|
| 15 |
async def setup_system():
|
|
|
|
| 1 |
# [file name]: core/system_initializer.py
|
| 2 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 3 |
+
import sys
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 6 |
+
|
| 7 |
import logging
|
| 8 |
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
|
| 9 |
|
|
|
|
| 15 |
from langchain_openai import ChatOpenAI
|
| 16 |
from config import settings # Make sure this import is correct
|
| 17 |
|
| 18 |
+
|
| 19 |
logger = logging.getLogger(__name__)
|
| 20 |
|
| 21 |
async def setup_system():
|
main.py
CHANGED
|
@@ -3,6 +3,10 @@
|
|
| 3 |
Scalable Multi-Country Legal RAG System
|
| 4 |
Supports dynamic addition of new countries with clean architecture
|
| 5 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
import asyncio
|
| 8 |
import logging
|
|
|
|
| 3 |
Scalable Multi-Country Legal RAG System
|
| 4 |
Supports dynamic addition of new countries with clean architecture
|
| 5 |
"""
|
| 6 |
+
# Add this as the FIRST lines of code (after docstrings)
|
| 7 |
+
import sys
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 10 |
|
| 11 |
import asyncio
|
| 12 |
import logging
|