UnnamedUnknownx1234987789489 commited on
Commit
cc3c654
1 Parent(s): ae9a3b7

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +3 -3
functions.py CHANGED
@@ -212,7 +212,7 @@ def create_workflow(retriever):
212
 
213
  return custom_graph
214
 
215
- async def retrieval_grader_grader(llm):
216
  """
217
  Function to create a grader object using a passed LLM model.
218
 
@@ -691,7 +691,7 @@ def generate(state,QA_chain):
691
  }
692
 
693
 
694
- def grade_documents(state, retrieval_grader):
695
  question = state["question"]
696
  documents = state["documents"]
697
  steps = state["steps"]
@@ -703,7 +703,7 @@ def grade_documents(state, retrieval_grader):
703
 
704
  for d in documents:
705
  # Call the grading function
706
- score = retrieval_grader.invoke({"question": question, "documents": d})
707
  print(f"Grader output for document: {score}") # Detailed debugging output
708
 
709
  # Extract the grade
 
212
 
213
  return custom_graph
214
 
215
+ def retrieval_grader_grader(llm):
216
  """
217
  Function to create a grader object using a passed LLM model.
218
 
 
691
  }
692
 
693
 
694
+ async def grade_documents(state, retrieval_grader):
695
  question = state["question"]
696
  documents = state["documents"]
697
  steps = state["steps"]
 
703
 
704
  for d in documents:
705
  # Call the grading function
706
+ score = await retrieval_grader.ainvoke({"question": question, "documents": d})
707
  print(f"Grader output for document: {score}") # Detailed debugging output
708
 
709
  # Extract the grade