class_docstr: Reference: https://docs.cohere.com/reference/generate
  
  The class `CohereConfig` provides configuration for the Cohere's API interface. Below are the parameters:
  
  - `num_generations` (integer): Maximum number of generations returned. Default is 1, with a minimum value of 1 and a maximum value of 5.
  
  - `max_tokens` (integer): Maximum number of tokens the model will generate as part of the response. Default value is 20.
  
  - `truncate` (string): Specifies how the API handles inputs longer than maximum token length. Options include NONE, START, END. Default is END.
  
  - `temperature` (number): A non-negative float controlling the randomness in generation. Lower temperatures result in less random generations. Default is 0.75.
  
  - `preset` (string): Identifier of a custom preset, a combination of parameters such as prompt, temperature etc.
  
  - `end_sequences` (array of strings): The generated text gets cut at the beginning of the earliest occurrence of an end sequence, which will be excluded from the text.
  
  - `stop_sequences` (array of strings): The generated text gets cut at the end of the earliest occurrence of a stop sequence, which will be included in the text.
  
  - `k` (integer): Limits generation at each step to top `k` most likely tokens. Default is 0.
  
  - `p` (number): Limits generation at each step to most likely tokens with total probability mass of `p`. Default is 0.
  
  - `frequency_penalty` (number): Reduces repetitiveness of generated tokens. Higher values apply stronger penalties to previously occurred tokens.
  
  - `presence_penalty` (number): Reduces repetitiveness of generated tokens. Similar to frequency_penalty, but this penalty applies equally to all tokens that have already appeared.
  
  - `return_likelihoods` (string): Specifies how and if token likelihoods are returned with the response. Options include GENERATION, ALL and NONE.
  
  - `logit_bias` (object): Used to prevent the model from generating unwanted tokens or to incentivize it to include desired tokens. e.g. {"hello_world": 1233}
class_docstr_tok: ["Reference",":","https",":","\/\/docs.cohere.com\/reference\/generate","The","class","`","CohereConfig","`","provides","configuration","for","the","Cohere","'s","API","interface",".","Below","are","the","parameters",":","-","`","num_generations","`","(","integer",")",":","Maximum","number","of","generations","returned",".","Default","is","1",",","with","a","minimum","value","of","1","and","a","maximum","value","of","5",".","-","`","max_tokens","`","(","integer",")",":","Maximum","number","of","tokens","the","model","will","generate","as","part","of","the","response",".","Default","value","is","20",".","-","`","truncate","`","(","string",")",":","Specifies","how","the","API","handles","inputs","longer","than","maximum","token","length",".","Options","include","NONE",",","START",",","END",".","Default","is","END",".","-","`","temperature","`","(","number",")",":","A","non-negative","float","controlling","the","randomness","in","generation",".","Lower","temperatures","result","in","less","random","generations",".","Default","is","0.75",".","-","`","preset","`","(","string",")",":","Identifier","of","a","custom","preset",",","a","combination","of","parameters","such","as","prompt",",","temperature","etc",".","-","`","end_sequences","`","(","array","of","strings",")",":","The","generated","text","gets","cut","at","the","beginning","of","the","earliest","occurrence","of","an","end","sequence",",","which","will","be","excluded","from","the","text",".","-","`","stop_sequences","`","(","array","of","strings",")",":","The","generated","text","gets","cut","at","the","end","of","the","earliest","occurrence","of","a","stop","sequence",",","which","will","be","included","in","the","text",".","-","`","k","`","(","integer",")",":","Limits","generation","at","each","step","to","top","`","k","`","most","likely","tokens",".","Default","is","0",".","-","`","p","`","(","number",")",":","Limits","generation","at","each","step","to","most","likely","tokens","with","total","probability","mass","of","`","p","`",".","Default","is","0",".","-","`","frequency_penalty","`","(","number",")",":","Reduces","repetitiveness","of","generated","tokens",".","Higher","values","apply","stronger","penalties","to","previously","occurred","tokens",".","-","`","presence_penalty","`","(","number",")",":","Reduces","repetitiveness","of","generated","tokens",".","Similar","to","frequency_penalty",",","but","this","penalty","applies","equally","to","all","tokens","that","have","already","appeared",".","-","`","return_likelihoods","`","(","string",")",":","Specifies","how","and","if","token","likelihoods","are","returned","with","the","response",".","Options","include","GENERATION",",","ALL","and","NONE",".","-","`","logit_bias","`","(","object",")",":","Used","to","prevent","the","model","from","generating","unwanted","tokens","or","to","incentivize","it","to","include","desired","tokens",".","e.g",".","{","``","hello_world","''",":","1233","}"]
code: def __init__(
      self,
      num_generations: Optional[int] = None,
      max_tokens: Optional[int] = None,
      truncate: Optional[str] = None,
      temperature: Optional[int] = None,
      preset: Optional[str] = None,
      end_sequences: Optional[list] = None,
      stop_sequences: Optional[list] = None,
      k: Optional[int] = None,
      p: Optional[int] = None,
      frequency_penalty: Optional[int] = None,
      presence_penalty: Optional[int] = None,
      return_likelihoods: Optional[str] = None,
      logit_bias: 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/cohere.py
imports: import os, types
  import json
  from enum import Enum
  import requests
  import time, traceback
  from typing import Callable, Optional
  from litellm.utils import ModelResponse, Choices, Message, Usage
  import litellm
  import httpx
label_desc: Use image node_id 1 to create a new CohereConfig object  with example: obj = CohereConfig(num_generations, max_tokens, truncate, temperature, preset, end_sequences, stop_sequences, k, p, frequency_penalty, presence_penalty, return_likelihoods, logit_bias)