mvp / step_2_compare_documents.py
Math
Add functions
22ecb24
Raw
History Blame Contribute Delete
441 Bytes
import time
from llama_index.core import Settings
from llama_index.llms.openai import OpenAI
from utils.comparison import compare_proposal_to_specs
Settings.llm = OpenAI(model="gpt-4o-mini")
def compare_documents(st) -> str:
time.sleep(.8)
details = compare_proposal_to_specs(st.session_state.state.index_ground_truth, st.session_state.state.index_proposals, st)
return "Step 2: Documents compared successfully", details