Browse Source

Merge pull request #12 from embedchain/rename-query-endpoint

Rename query endpoint
Taranjeet Singh 2 years ago
parent
commit
62a74025a7
3 changed files with 8 additions and 8 deletions
  1. 5 5
      README.md
  2. 2 2
      embedchain/embedchain.py
  3. 1 1
      setup.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.
 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 `.query` function to find an answer from the added datasets.
+You can add a single or multiple dataset using `.add` function and then use `.qna` 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.
 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/feedback")
 naval_chat_bot.add("web_page", "https://nav.al/agi")
 naval_chat_bot.add("web_page", "https://nav.al/agi")
 
 
-naval_chat_bot.query("What unique capacity does Naval argue humans possess when it comes to understanding explanations or concepts?")
+naval_chat_bot.qna("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.
 # 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
 from embedchain import App as ECApp
 ```
 ```
 
 
-* Now your app is created. You can use `.query` function to get the answer for any query.
+* Now your app is created. You can use `.qna` function to get the answer for any query.
 
 
 ```python
 ```python
-print(naval_chat_bot.query("What unique capacity does Naval argue humans possess when it comes to understanding explanations or concepts?"))
+print(naval_chat_bot.qna("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.
 # answer: Naval argues that humans possess the unique capacity to understand explanations or concepts to the maximum extent possible in this physical reality.
 ```
 ```
 
 
@@ -132,7 +132,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.
 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 `.query` 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 `.qna` function to get the relevant answer.
 
 
 # Tech Stack
 # Tech Stack
 
 

+ 2 - 2
embedchain/embedchain.py

@@ -170,7 +170,7 @@ class EmbedChain:
         answer = self.get_openai_answer(prompt)
         answer = self.get_openai_answer(prompt)
         return answer
         return answer
 
 
-    def query(self, input_query):
+    def qna(self, input_query):
         """
         """
         Queries the vector database based on the given 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
         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.
     Has two functions: add and query.
 
 
     adds(data_type, url): adds the data from the given URL to the vector db.
     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
     pass

+ 1 - 1
setup.py

@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
 
 
 setuptools.setup(
 setuptools.setup(
     name="embedchain",
     name="embedchain",
-    version="0.0.4",
+    version="0.0.5",
     author="Taranjeet Singh",
     author="Taranjeet Singh",
     author_email="reachtotj@gmail.com",
     author_email="reachtotj@gmail.com",
     description="embedchain is a framework to easily create LLM powered bots over any dataset",
     description="embedchain is a framework to easily create LLM powered bots over any dataset",