Rename query endpoint to qna

Query endpoint takes a query and returns an answer
on the basis of retrieved similar docs.
Thought about the name and realized that qna makes
much more sense than query, as it takes a query
and returns an answer
This commit is contained in:
Taranjeet Singh
2023-06-21 12:35:36 +05:30
parent 570745c11a
commit 6bc7e9b7a7
2 changed files with 7 additions and 7 deletions

View File

@@ -170,7 +170,7 @@ class EmbedChain:
answer = self.get_openai_answer(prompt)
return answer
def query(self, input_query):
def qna(self, input_query):
"""
Queries the vector database based on the given input query.
Gets relevant doc based on the query and then passes it to an
@@ -194,6 +194,6 @@ class App(EmbedChain):
Has two functions: add and query.
adds(data_type, url): adds the data from the given URL to the vector db.
query(query): finds answer to the given query using vector database and LLM.
qna(query): finds answer to the given query using vector database and LLM.
"""
pass