class_docstr: Custom `StoppingCriteria` which checks if all generated functions in the batch are completed.
class_docstr_tok: ["Custom","`","StoppingCriteria","`","which","checks","if","all","generated","functions","in","the","batch","are","completed","."]
code: def __init__(self, input_length, stop_words, tokenizer):
      self.input_length = input_length
      self.stop_words = stop_words
      self.stop_words += ["|<end|", "|end>|"]
      self.tokenizer = tokenizer
  
imports: import time
  import json
  from tqdm import tqdm
  from argparse import ArgumentParser
  from typing import Dict, List
  from threading import Thread
  import torch
  import uvicorn
  from fastapi import FastAPI
  from fastapi.responses import JSONResponse
  from fastapi.middleware.cors import CORSMiddleware
  from pydantic import BaseModel
  from transformers import AutoTokenizer
  from bigdl.llm.transformers import AutoModelForCausalLM, AutoModel
  from transformers.generation import GenerationConfig, TextIteratorStreamer
  from transformers import StoppingCriteriaList, StoppingCriteria
  from sse_starlette.sse import EventSourceResponse
label_desc: Use image node_id 1 to create a new StopWordsCriteria object from inherited base classes: StoppingCriteria with example: obj = StopWordsCriteria(input_length, stop_words, tokenizer)