class_docstr: Question-answering using OpenAI or open-source GPT or GPT-like generative LLM models
class_docstr_tok: ["Question-answering","using","OpenAI","or","open-source","GPT","or","GPT-like","generative","LLM","models"]
docstr: This will delete the entire index.
docstr_tok: ["This","will","delete","the","entire","index","."]
code: def clear_index(self):
      """
      This will delete the entire index.
      """
      if (
          input(
              "are you sure you want to delete the vector index? (y/n)"
          )
          != "y"
      ):
          print("ok - aborting")
          return
      index_path = self.docs.index_path.as_posix()
      self.docs.clear()
      self.save(index_path)
  
file_path: ktrain/ktrain/text/qa/generative_qa.py
imports: import sys
  import os
  import pickle
  from typing import Optional
  from pathlib import Path
label_desc: Use image node_id 4 for calling the GenerativeQA obj's underlying member method code with example usage: obj.clear_index() without return types