class_docstr: Reference: https://docs.ai21.com/reference/j2-complete-ref
  
  The class `AI21Config` provides configuration for the AI21's API interface. Below are the parameters:
  
  - `numResults` (int32): Number of completions to sample and return. Optional, default is 1. If the temperature is greater than 0 (non-greedy decoding), a value greater than 1 can be meaningful.
  
  - `maxTokens` (int32): The maximum number of tokens to generate per result. Optional, default is 16. If no `stopSequences` are given, generation stops after producing `maxTokens`.
  
  - `minTokens` (int32): The minimum number of tokens to generate per result. Optional, default is 0. If `stopSequences` are given, they are ignored until `minTokens` are generated.
  
  - `temperature` (float): Modifies the distribution from which tokens are sampled. Optional, default is 0.7. A value of 0 essentially disables sampling and results in greedy decoding.
  
  - `topP` (float): Used for sampling tokens from the corresponding top percentile of probability mass. Optional, default is 1. For instance, a value of 0.9 considers only tokens comprising the top 90% probability mass.
  
  - `stopSequences` (array of strings): Stops decoding if any of the input strings is generated. Optional.
  
  - `topKReturn` (int32): Range between 0 to 10, including both. Optional, default is 0. Specifies the top-K alternative tokens to return. A non-zero value includes the string representations and log-probabilities for each of the top-K alternatives at each position.
  
  - `frequencyPenalty` (object): Placeholder for frequency penalty object.
  
  - `presencePenalty` (object): Placeholder for presence penalty object.
  
  - `countPenalty` (object): Placeholder for count penalty object.
class_docstr_tok: ["Reference",":","https",":","\/\/docs.ai21.com\/reference\/j2-complete-ref","The","class","`","AI21Config","`","provides","configuration","for","the","AI21","'s","API","interface",".","Below","are","the","parameters",":","-","`","numResults","`","(","int32",")",":","Number","of","completions","to","sample","and","return",".","Optional",",","default","is","1",".","If","the","temperature","is","greater","than","0","(","non-greedy","decoding",")",",","a","value","greater","than","1","can","be","meaningful",".","-","`","maxTokens","`","(","int32",")",":","The","maximum","number","of","tokens","to","generate","per","result",".","Optional",",","default","is","16",".","If","no","`","stopSequences","`","are","given",",","generation","stops","after","producing","`","maxTokens","`",".","-","`","minTokens","`","(","int32",")",":","The","minimum","number","of","tokens","to","generate","per","result",".","Optional",",","default","is","0",".","If","`","stopSequences","`","are","given",",","they","are","ignored","until","`","minTokens","`","are","generated",".","-","`","temperature","`","(","float",")",":","Modifies","the","distribution","from","which","tokens","are","sampled",".","Optional",",","default","is","0.7",".","A","value","of","0","essentially","disables","sampling","and","results","in","greedy","decoding",".","-","`","topP","`","(","float",")",":","Used","for","sampling","tokens","from","the","corresponding","top","percentile","of","probability","mass",".","Optional",",","default","is","1",".","For","instance",",","a","value","of","0.9","considers","only","tokens","comprising","the","top","90","%","probability","mass",".","-","`","stopSequences","`","(","array","of","strings",")",":","Stops","decoding","if","any","of","the","input","strings","is","generated",".","Optional",".","-","`","topKReturn","`","(","int32",")",":","Range","between","0","to","10",",","including","both",".","Optional",",","default","is","0",".","Specifies","the","top-K","alternative","tokens","to","return",".","A","non-zero","value","includes","the","string","representations","and","log-probabilities","for","each","of","the","top-K","alternatives","at","each","position",".","-","`","frequencyPenalty","`","(","object",")",":","Placeholder","for","frequency","penalty","object",".","-","`","presencePenalty","`","(","object",")",":","Placeholder","for","presence","penalty","object",".","-","`","countPenalty","`","(","object",")",":","Placeholder","for","count","penalty","object","."]
code: def __init__(
      self,
      numResults: Optional[int] = None,
      maxTokens: Optional[int] = None,
      minTokens: Optional[int] = None,
      temperature: Optional[float] = None,
      topP: Optional[float] = None,
      stopSequences: Optional[list] = None,
      topKReturn: Optional[int] = None,
      frequencePenalty: Optional[dict] = None,
      presencePenalty: Optional[dict] = None,
      countPenalty: Optional[dict] = None,
  ) -> None:
      locals_ = locals()
      for key, value in locals_.items():
          if key != "self" and value is not None:
              setattr(self.__class__, key, value)
  
file_path: litellm/litellm/llms/ai21.py
imports: import os, types, traceback
  import json
  from enum import Enum
  import requests
  import time, httpx
  from typing import Callable, Optional
  from litellm.utils import ModelResponse, Choices, Message
  import litellm
label_desc: Use image node_id 1 to create a new AI21Config object  with example: obj = AI21Config(numResults, maxTokens, minTokens, temperature, topP, stopSequences, topKReturn, frequencePenalty, presencePenalty, countPenalty)