MCPcopy Create free account
hub / github.com/TIGER-AI-Lab/LongRAG / predict

Method predict

utils/gemini_inference.py:49–54  ·  view source on GitHub ↗
(self, prompt)

Source from the content-addressed store, hash-verified

47 return text
48
49 def predict(self, prompt):
50 chat_session = self.model.start_chat(
51 history=[]
52 )
53 response = chat_session.send_message(prompt)
54 return self.post_process(response.text)
55
56 def predict_nq(self, context, question, titles):
57 prompt = (f"Go through the following context and then extract the answer of the question from the context. "

Callers 4

predict_nqMethod · 0.95
predict_hotpotqaMethod · 0.95
predict_close_bookMethod · 0.95
extract_answerMethod · 0.95

Calls 1

post_processMethod · 0.95

Tested by

no test coverage detected