Views
No views yet
pip install -r requirements.txt1from qa_expert import get_inference_model, InferenceType
2def retrieve(query: str) -> str:
3 # You need to implement this retrieval function, input is a query and output is a string
4 # This can be treated as the function to call in function calling of OpenAI
5 return context
6
7model_inference = get_inference_model(InferenceType.hf, "khaimaitien/qa-expert-7B-V1.0")
8answer, messages = model_inference.generate_answer(question, retriever_func)