code: def api_userinput():
      data = request.get_json()
      user_input = data["user_input"]
  
      with generate_lock:
          result = Response(
              stream_with_context(session.respond_multi(user_input)),
              mimetype="application/json",
          )
          return result
  
imports: import sys
  import os
  from model import ExLlama, ExLlamaConfig
  from flask import Flask, render_template, request, jsonify
  from flask import Response, stream_with_context
  from threading import Timer, Lock
  import webbrowser
  import json
  import model_init
  from session import prepare_sessions, get_initial_session, Session, load_session, new_session, _sessions_dir
  import argparse
  from tokenizer import ExLlamaTokenizer
  from waitress import serve
label_desc: Use image node_id 11 for calling a global function with example usage: api_userinput() and returns: result