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: ```
  Get default key and citation
  ```
docstr_tok: ["``","`","Get","default","key","and","citation","``","`"]
code: def default_key_and_citation(
      self,
      path: str,
      key: Optional[str] = None,
      citation: Optional[str] = None,
  ):
      """
      ```
      Get default key and citation
      ```
      """
      if path.endswith(".pdf"):
          return (key, citation)
      default_key = self.compute_key(path)
      if key is None:
          key = default_key
      if citation is None:
          citation = f"Document {default_key}"
      return (key, citation)
  
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 7 for calling the GenerativeQA obj's underlying member method code with example usage: obj.default_key_and_citation(path, key, citation) and returns: key,  citation, key,  citation