cjber commited on
Commit
093f5e0
·
1 Parent(s): 6b42560

update test summary with themes

Browse files
Files changed (1) hide show
  1. planning_ai/chains/reduce_chain.py +7 -23
planning_ai/chains/reduce_chain.py CHANGED
@@ -11,30 +11,14 @@ reduce_prompt = ChatPromptTemplate([("human", reduce_template)])
11
  reduce_chain = reduce_prompt | LLM | StrOutputParser()
12
 
13
  if __name__ == "__main__":
14
- test_document = """
15
- The response expresses concern over the proposed mass development north-west of Cambridge,
16
- highlighting significant growth in the area over the past twenty years, particularly with
17
- the establishment of Cambourne and the expansion of Papworth Everard. The author is worried
18
- about the implications of further development given the existing growth.
 
19
 
20
- OPPOSE
21
- """
22
- test_summary = BriefSummary(
23
- summary="""
24
- The author expresses concern over the proposed mass development north-west of
25
- Cambridge, highlighting the significant growth in the area over the past twenty years,
26
- particularly with the creation of Cambourne and the expansion of Papworth Everard.
27
- """,
28
- stance="OPPOSE",
29
- themes=[
30
- "Local growth",
31
- "Development concerns",
32
- "Impact on existing settlements",
33
- ],
34
- rating=5,
35
- )
36
-
37
- result = reduce_chain.invoke({"context": test_document})
38
 
39
  print("Generated Report:")
40
  print(result)
 
11
  reduce_chain = reduce_prompt | LLM | StrOutputParser()
12
 
13
  if __name__ == "__main__":
14
+ test_summary = """
15
+ The author expresses concern over the proposed mass development north-west of Cambridge,
16
+ highlighting significant growth in the area over the past twenty years, particularly with
17
+ the creation of Cambourne and the expansion of Papworth Everard.
18
+ Related Aims: [Homes, Infrastructure]
19
+ """
20
 
21
+ result = reduce_chain.invoke({"context": test_summary})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  print("Generated Report:")
24
  print(result)