code: def get_args(
      prompt,
      prompt_type=None,
      chat=False,
      stream_output=False,
      max_new_tokens=50,
      top_k_docs=3,
      langchain_mode="Disabled",
      add_chat_history_to_context=True,
      langchain_action=LangChainAction.QUERY.value,
      langchain_agents=[],
      prompt_dict=None,
      version=None,
      h2ogpt_key=None,
      visible_models=None,
      system_prompt="",  # default of no system prompt triggered by empty string
      add_search_to_context=False,
      chat_conversation=None,
      text_context_list=None,
      document_choice=[],
      document_source_substrings=[],
      document_source_substrings_op="and",
      document_content_substrings=[],
      document_content_substrings_op="and",
      max_time=20,
      repetition_penalty=1.0,
      do_sample=True,
  ):
      from collections import OrderedDict
  
      kwargs = OrderedDict(
          instruction=prompt if chat else "",  # only for chat=True
          iinput="",  # only for chat=True
          context="",
          # streaming output is supported, loops over and outputs each generation in streaming mode
          # but leave stream_output=False for simple input/output mode
          stream_output=stream_output,
          prompt_type=prompt_type,
          prompt_dict=prompt_dict,
          temperature=0.1,
          top_p=0.75,
          top_k=40,
          penalty_alpha=0,
          num_beams=1,
          max_new_tokens=max_new_tokens,
          min_new_tokens=0,
          early_stopping=False,
          max_time=max_time,
          repetition_penalty=repetition_penalty,
          num_return_sequences=1,
          do_sample=do_sample,
          chat=chat,
          instruction_nochat=prompt if not chat else "",
          iinput_nochat="",  # only for chat=False
          langchain_mode=langchain_mode,
          add_chat_history_to_context=add_chat_history_to_context,
          langchain_action=langchain_action,
          langchain_agents=langchain_agents,
          top_k_docs=top_k_docs,
          chunk=True,
          chunk_size=512,
          document_subset=DocumentSubset.Relevant.name,
          document_choice=[] or document_choice,
          document_source_substrings=[] or document_source_substrings,
          document_source_substrings_op="and"
          or document_source_substrings_op,
          document_content_substrings=[] or document_content_substrings,
          document_content_substrings_op="and"
          or document_content_substrings_op,
          pre_prompt_query=None,
          prompt_query=None,
          pre_prompt_summary=None,
          prompt_summary=None,
          hyde_llm_prompt=None,
          system_prompt=system_prompt,
          image_audio_loaders=None,
          pdf_loaders=None,
          url_loaders=None,
          jq_schema=None,
          extract_frames=None,
          llava_prompt=None,
          visible_models=visible_models,
          h2ogpt_key=h2ogpt_key,
          add_search_to_context=add_search_to_context,
          chat_conversation=chat_conversation,
          text_context_list=text_context_list,
          docs_ordering_type=None,
          min_max_new_tokens=None,
          max_input_tokens=None,
          max_total_input_tokens=None,
          docs_token_handling=None,
          docs_joiner=None,
          hyde_level=0,
          hyde_template=None,
          hyde_show_only_final=False,
          doc_json_mode=False,
          chatbot_role="None",
          speaker="None",
          tts_language="autodetect",
          tts_speed=1.0,
      )
      diff = 0
      if version is None:
          # latest
          version = 1
      if version == 0:
          diff = 1
      if version >= 1:
          kwargs.update(dict(system_prompt=system_prompt))
          diff = 0
  
      from evaluate_params import eval_func_param_names
  
      assert (
          len(
              set(eval_func_param_names).difference(
                  set(list(kwargs.keys()))
              )
          )
          == diff
      )
      if chat:
          # add chatbot output on end.  Assumes serialize=False
          kwargs.update(dict(chatbot=[]))
  
      return kwargs, list(kwargs.values())
  
imports: import ast
  import time
  import os
  import markdown
  import pytest
  from bs4 import BeautifulSoup
  from src.utils import is_gradio_version4
  from tests.utils import get_inf_server
label_desc: Use image node_id 2 for calling a global function with example usage: get_args(prompt, prompt_type, chat, stream_output, max_new_tokens, top_k_docs, langchain_mode, add_chat_history_to_context, langchain_action, langchain_agents, prompt_dict, version, h2ogpt_key, visible_models, system_prompt, add_search_to_context, chat_conversation, text_context_list, document_choice, document_source_substrings, document_source_substrings_op, document_content_substrings, document_content_substrings_op, max_time, repetition_penalty, do_sample) and returns: kwargs,  list