Skip to main content

UnifiedModelType

Class used for support both :obj:ModelType and :obj:str to be used to represent a model type in a unified way. This class is a subclass of :obj:str so that it can be used as string seamlessly. Parameters:
  • value (Union[ModelType, str]): The value of the model type.

new

init

repr

str

value_for_tiktoken

Returns the model name for TikToken.

token_limit

Returns the context window size for the model. For unknown model types not defined in ModelType enum, this returns a default value of 999_999_999 tokens.

is_openai

Returns whether the model is an OpenAI model.

is_aws_bedrock

Returns whether the model is an AWS Bedrock model.

is_anthropic

Returns whether the model is an Anthropic model.

is_azure_openai

Returns whether the model is an Azure OpenAI model.

is_groq

Returns whether the model is a Groq served model.

is_nebius

Returns whether the model is a Nebius AI Studio served model.

is_openrouter

Returns whether the model is a OpenRouter served model.

is_atlascloud

Returns whether the model is a AtlasCloud served model.

is_lmstudio

Returns whether the model is a LMStudio served model.

is_ppio

Returns whether the model is a PPIO served model.

is_zhipuai

Returns whether the model is a Zhipuai model.

is_gemini

Returns whether the model is a Gemini model.

is_mistral

Returns whether the model is a Mistral model.

is_netmind

Returns whether the model is a Netmind model.

is_reka

Returns whether the model is a Reka model.

is_cohere

Returns whether the model is a Cohere model.

is_cometapi

Returns whether the model is a CometAPI served model.

is_yi

Returns whether the model is a Yi model.

is_qwen

Returns whether the model is a Qwen model.

is_internlm

Returns whether the model is a InternLM model.

is_modelscope

Returns whether the model is a ModelScope serverd model.

is_moonshot

Returns whether this platform is Moonshot model.

is_novita

Returns whether the model is a Novita served model.

is_watsonx

Returns whether the model is a WatsonX served model.

is_qianfan

Returns whether the model is a Qianfan served model.

is_crynux

Returns whether the model is a Crynux served model.

is_minimax

Returns whether the model is a Minimax served model.

support_native_structured_output

Returns whether the model supports native structured output.

support_native_tool_calling

Returns whether the model supports native tool calling.