class QianfanModel(OpenAICompatibleModel):
openai.ChatCompletion.create()
. If :obj:None
, :obj:QianfanConfig().as_dict()
will be used. (default: :obj:None
)None
)None
)OpenAITokenCounter( ModelType.GPT_4O_MINI)
will be used.None
)None
) **kwargs: Additional model-specific parameters that will be passed to the model constructor.def __init__(
self,
model_type: Union[ModelType, str],
model_config_dict: Optional[Dict[str, Any]] = None,
api_key: Optional[str] = None,
url: Optional[str] = None,
token_counter: Optional[BaseTokenCounter] = None,
timeout: Optional[float] = None,
max_retries: int = 3,
**kwargs
):
def check_model_config(self):