File size: 923 Bytes
2b5f461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import sys

sys.path.append(os.path.dirname(os.path.abspath(__file__)))

from graph.workflow import build_workflow

def test():
    app = build_workflow()
    
    initial_state = {
        "user_input": "I am a 25 year old farmer with 2 acres of land",
        "user_interests": ["schemes", "exams"],
        "profile": {},
        "scheme_vectorstore": None,
        "exam_vectorstore": None,
        "errors": []
    }
    
    try:
        # We need GROQ_API_KEY for this to work
        os.environ["GROQ_API_KEY"] = "gsk_dummy"  # But this will fail authentication
        # So instead we mock the LLM calls to see the graph flow.
        
        # Actually let's just print the graph flow if possible?
        # Or better yet, we can see if scheme_recommendations is not being populated correctly.
        pass
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    test()