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: ```
  Save current document vector database to folder represented by path
  Save the current vector database to disk
  
  Args:
    path(str): folder path
  ```
docstr_tok: ["``","`","Save","current","document","vector","database","to","folder","represented","by","path","Save","the","current","vector","database","to","disk","Args",":","path","(","str",")",":","folder","path","``","`"]
code: def save(self, path: str):
      """
      ```
      Save current document vector database to folder represented by path
      Save the current vector database to disk
  
      Args:
        path(str): folder path
      ```
      """
      if not os.path.exists(path):
          os.makedirs(path)
      self.docs.index_path = Path(path)
      with open(os.path.join(path, DOCS), "wb") as f:
          pickle.dump(self.docs, f)
  
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 3 for calling the GenerativeQA obj's underlying member method code with example usage: obj.save(path) without return types