class_docstr: Parent class of gradio client
  To handle automatically refreshing client if detect gradio server changed
class_docstr_tok: ["Parent","class","of","gradio","client","To","handle","automatically","refreshing","client","if","detect","gradio","server","changed"]
docstr: Search for documents matching a focus, then ask a query to LLM with those documents
  If focus "" or None, no similarity search is done and all documents (up to top_k_docs) are used
docstr_tok: ["Search","for","documents","matching","a","focus",",","then","ask","a","query","to","LLM","with","those","documents","If","focus","``","''","or","None",",","no","similarity","search","is","done","and","all","documents","(","up","to","top_k_docs",")","are","used"]
code: def extract(
      self, *args, query=None, focus=None, **kwargs
  ) -> list[str]:
      """
      Search for documents matching a focus, then ask a query to LLM with those documents
      If focus "" or None, no similarity search is done and all documents (up to top_k_docs) are used
      """
      kwargs["prompt_extraction"] = kwargs.get(
          "prompt_extraction", query or prompt_extraction0
      )
      kwargs["instruction"] = kwargs.get("instruction", focus)
      kwargs["langchain_action"] = LangChainAction.EXTRACT.value
      ret = ""
      for response, texts_out in self.query_or_summarize_or_extract(
          *args, **kwargs
      ):
          ret = response
      return ret
  
imports: from __future__ import annotations
  import difflib
  import traceback
  import concurrent.futures
  import os
  import concurrent.futures
  import time
  import urllib.parse
  import uuid
  from concurrent.futures import Future
  from datetime import timedelta
  from enum import Enum
  from pathlib import Path
  from typing import Callable, Generator, Any, Union, List
  import ast
  from packaging import version
  from huggingface_hub import SpaceStage
  from huggingface_hub.utils import build_hf_headers
  from gradio_client import utils
  from importlib.metadata import distribution, PackageNotFoundError
  from gradio_client.client import Job, DEFAULT_TEMP_DIR, Endpoint
  from gradio_client import Client
label_desc: Use image node_id 16 for calling the GradioClient obj's underlying member method code with example usage: obj.extract() and returns: ret