File size: 341 Bytes
76e81d0
9e35a98
76e81d0
 
9e35a98
 
 
 
76e81d0
 
9e35a98
1
2
3
4
5
6
7
8
9
10
11
12
from utils import get_search_index, generate_answer, set_model_and_embeddings, set_session_id

def index(model, session_id):
    set_session_id(session_id)
    set_model_and_embeddings(model)
    get_search_index(model)
    return True

def run(question, model, session_id):
    index(model, session_id)
    return generate_answer(question)