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: ```
  GenerativeQA constructor
  
  Args:
    llm(str):  The LLM to use.  If None, gpt-3.5-turbo is used.
  ```
docstr_tok: ["``","`","GenerativeQA","constructor","Args",":","llm","(","str",")",":","The","LLM","to","use",".","If","None",",","gpt-3.5-turbo","is","used",".","``","`"]
code: def __init__(self, llm=None):
      """
      ```
      GenerativeQA constructor
  
      Args:
        llm(str):  The LLM to use.  If None, gpt-3.5-turbo is used.
      ```
      """
      if not PAPERQA_INSTALLED:
          raise Exception(
              "GenerativeQA in ktrain requires the paper-qa package by Andrew White: pip install paper-qa==2.1.1 langchain==0.0.240"
          )
      self.docs = Docs(llm)
      if is_notebook():
          import nest_asyncio
  
          nest_asyncio.apply()
  
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 1 to create a new GenerativeQA object  with example: obj = GenerativeQA(llm)