Преглед на файлове

Revert "Rename query endpoint to qna"

This reverts commit 6bc7e9b7a736c56d4ddc1285eddf847b4b551bdf.
Taranjeet Singh преди 2 години
родител
ревизия
63bd18056f
променени са 2 файла, в които са добавени 7 реда и са изтрити 7 реда
  1. 5 5
      README.md
  2. 2 2
      embedchain/embedchain.py

+ 5 - 5
README.md

@@ -4,7 +4,7 @@ embedchain is a framework to easily create LLM powered bots over any dataset.
 
 It abstracts the enitre process of loading dataset, chunking it, creating embeddings and then storing in vector database.
 
-You can add a single or multiple dataset using `.add` function and then use `.qna` function to find an answer from the added datasets.
+You can add a single or multiple dataset using `.add` function and then use `.query` function to find an answer from the added datasets.
 
 If you want to create a Naval Ravikant bot which has 1 youtube video, 1 book as pdf and 2 of his blog posts, all you need to do is add the links to the videos, pdf and blog posts and embedchain will create a bot for you.
 
@@ -19,7 +19,7 @@ naval_chat_bot.add("pdf_file", "https://navalmanack.s3.amazonaws.com/Eric-Jorgen
 naval_chat_bot.add("web_page", "https://nav.al/feedback")
 naval_chat_bot.add("web_page", "https://nav.al/agi")
 
-naval_chat_bot.qna("What unique capacity does Naval argue humans possess when it comes to understanding explanations or concepts?")
+naval_chat_bot.query("What unique capacity does Naval argue humans possess when it comes to understanding explanations or concepts?")
 # answer: Naval argues that humans possess the unique capacity to understand explanations or concepts to the maximum extent possible in this physical reality.
 ```
 
@@ -68,10 +68,10 @@ from embedchain import App as EmbedChainApp
 from embedchain import App as ECApp
 ```
 
-* Now your app is created. You can use `.qna` function to get the answer for any query.
+* Now your app is created. You can use `.query` function to get the answer for any query.
 
 ```python
-print(naval_chat_bot.qna("What unique capacity does Naval argue humans possess when it comes to understanding explanations or concepts?"))
+print(naval_chat_bot.query("What unique capacity does Naval argue humans possess when it comes to understanding explanations or concepts?"))
 # answer: Naval argues that humans possess the unique capacity to understand explanations or concepts to the maximum extent possible in this physical reality.
 ```
 
@@ -136,7 +136,7 @@ These questions may be trivial for some but for a lot of us, it needs research,
 
 embedchain is a framework which takes care of all these nuances and provides a simple interface to create bots over any dataset.
 
-In the first release, we are making it easier for anyone to get a chatbot over any dataset up and running in less than a minute. All you need to do is create an app instance, add the data sets using `.add` function and then use `.qna` function to get the relevant answer.
+In the first release, we are making it easier for anyone to get a chatbot over any dataset up and running in less than a minute. All you need to do is create an app instance, add the data sets using `.add` function and then use `.query` function to get the relevant answer.
 
 # Tech Stack
 

+ 2 - 2
embedchain/embedchain.py

@@ -170,7 +170,7 @@ class EmbedChain:
         answer = self.get_openai_answer(prompt)
         return answer
 
-    def qna(self, input_query):
+    def query(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.
-    qna(query): finds answer to the given query using vector database and LLM.
+    query(query): finds answer to the given query using vector database and LLM.
     """
     pass