Spaces:
Sleeping
Sleeping
Update core/workflow_nodes.py
Browse files- core/workflow_nodes.py +3 -0
core/workflow_nodes.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
from typing import Dict
|
| 2 |
from langchain.prompts import ChatPromptTemplate
|
| 3 |
from langchain_core.output_parsers import StrOutputParser
|
|
|
|
|
|
|
| 4 |
from models import llm, retriever
|
| 5 |
from agent_state import AgentState
|
| 6 |
from config import config
|
| 7 |
|
|
|
|
| 8 |
def expand_query(state: AgentState) -> AgentState:
|
| 9 |
"""Expands the user query to improve retrieval of nutrition disorder-related information."""
|
| 10 |
print("---------Expanding Query---------")
|
|
|
|
| 1 |
from typing import Dict
|
| 2 |
from langchain.prompts import ChatPromptTemplate
|
| 3 |
from langchain_core.output_parsers import StrOutputParser
|
| 4 |
+
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'models'))
|
| 5 |
+
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'config'))
|
| 6 |
from models import llm, retriever
|
| 7 |
from agent_state import AgentState
|
| 8 |
from config import config
|
| 9 |
|
| 10 |
+
|
| 11 |
def expand_query(state: AgentState) -> AgentState:
|
| 12 |
"""Expands the user query to improve retrieval of nutrition disorder-related information."""
|
| 13 |
print("---------Expanding Query---------")
|