Spaces:
Sleeping
Sleeping
Commit ·
29f53db
1
Parent(s): 0622102
feat: ver 2.0
Browse files- LiteratureAgent.py +2 -2
- Refiner.py +1 -1
- articles_db.csv +3 -0
LiteratureAgent.py
CHANGED
|
@@ -43,7 +43,7 @@ ALWAYS maintain valid XML structure with properly closed tags. Here are the arti
|
|
| 43 |
|
| 44 |
|
| 45 |
class RoofCoverChatbot:
|
| 46 |
-
def __init__(self, model: str = "gpt-
|
| 47 |
"""
|
| 48 |
Initialize the RoofCoverChatbot by setting up the retrieval chain,
|
| 49 |
which uses scientific literature documents to generate an XML-formatted answer.
|
|
@@ -72,7 +72,7 @@ class RoofCoverChatbot:
|
|
| 72 |
self.vectordb = Chroma(
|
| 73 |
collection_name="roofs_collection",
|
| 74 |
embedding_function=embeddings,
|
| 75 |
-
persist_directory="./
|
| 76 |
)
|
| 77 |
# Use similarity search to retrieve the top-K documents.
|
| 78 |
self.retriever = self.vectordb.as_retriever(
|
|
|
|
| 43 |
|
| 44 |
|
| 45 |
class RoofCoverChatbot:
|
| 46 |
+
def __init__(self, model: str = "gpt-4.1", temperature: float = 0.1):
|
| 47 |
"""
|
| 48 |
Initialize the RoofCoverChatbot by setting up the retrieval chain,
|
| 49 |
which uses scientific literature documents to generate an XML-formatted answer.
|
|
|
|
| 72 |
self.vectordb = Chroma(
|
| 73 |
collection_name="roofs_collection",
|
| 74 |
embedding_function=embeddings,
|
| 75 |
+
persist_directory="./chroma_db",
|
| 76 |
)
|
| 77 |
# Use similarity search to retrieve the top-K documents.
|
| 78 |
self.retriever = self.vectordb.as_retriever(
|
Refiner.py
CHANGED
|
@@ -16,7 +16,7 @@ class Answer(BaseModel):
|
|
| 16 |
|
| 17 |
|
| 18 |
class RefinementPipeline:
|
| 19 |
-
def __init__(self, model: str = "gpt-
|
| 20 |
self.llm = ChatOpenAI(model=model, temperature=temperature)
|
| 21 |
self.parser = JsonOutputParser(pydantic_object=Answer)
|
| 22 |
self.prompt = PromptTemplate(
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
class RefinementPipeline:
|
| 19 |
+
def __init__(self, model: str = "gpt-4.1", temperature: float = 0.1):
|
| 20 |
self.llm = ChatOpenAI(model=model, temperature=temperature)
|
| 21 |
self.parser = JsonOutputParser(pydantic_object=Answer)
|
| 22 |
self.prompt = PromptTemplate(
|
articles_db.csv
CHANGED
|
@@ -64,3 +64,6 @@ id,title,file_name,link
|
|
| 64 |
64,IBHS Website,Transcript.pdf,https://ibhs.org/events/
|
| 65 |
65,2025 FORTIFIED Home Standards,2025_fortified_home_standard.pdf,https://fortifiedhome.org/technical-documents/
|
| 66 |
66,FORTIFIED Website,roofing_roadmaps_roof_101.pdf,https://fortifiedhome.org/roof/
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
64,IBHS Website,Transcript.pdf,https://ibhs.org/events/
|
| 65 |
65,2025 FORTIFIED Home Standards,2025_fortified_home_standard.pdf,https://fortifiedhome.org/technical-documents/
|
| 66 |
66,FORTIFIED Website,roofing_roadmaps_roof_101.pdf,https://fortifiedhome.org/roof/
|
| 67 |
+
67,Claims Analysis and Damage Investigation of a Significant Hail Event in Rock Hill SC,claims_analysis_and_damage_investigation_of_a_significant_hail_event_in_rock_hill_sc.pdf,https://ibhs.org/?a=download&err=none&key=2d0eae667b0003d2edcd3faa1e4fbd86
|
| 68 |
+
68,2024 Residential Wind-Loss Mitigation Study,2024_residential_wind_loss_mitigation_study.pdf,https://floir.com/docs-sf/default-source/property-and-casualty/other-property-casualty-reports/005480_fl_oir_report_final_240628.pdf?sfvrsn=bfaf26d9_3
|
| 69 |
+
69,Performance of IBHS FORTIFIED Home Construction in Hurricane Sally,performance_of_ibhs_fortified_home_construction_in_hurricane_sally.pdf,https://www.aldoi.gov/PDF/News/PerformanceIBHSFortifiedHomeConstructionHurricaneSally.pdf
|