camel.types package

Contents

camel.types package#

Submodules#

camel.types.enums module#

class camel.types.enums.AudioModelType(value)[source]#

Bases: Enum

An enumeration.

TTS_1 = 'tts-1'#
TTS_1_HD = 'tts-1-hd'#
property is_openai: bool#

Returns whether this type of audio models is an OpenAI-released model.

class camel.types.enums.EmbeddingModelType(value)[source]#

Bases: Enum

An enumeration.

MISTRAL_EMBED = 'mistral-embed'#
TEXT_EMBEDDING_3_LARGE = 'text-embedding-3-large'#
TEXT_EMBEDDING_3_SMALL = 'text-embedding-3-small'#
TEXT_EMBEDDING_ADA_2 = 'text-embedding-ada-002'#
property is_mistral: bool#

Returns whether this type of models is an Mistral-released model.

property is_openai: bool#

Returns whether this type of models is an OpenAI-released model.

property output_dim: int#
class camel.types.enums.JinaReturnFormat(value)[source]#

Bases: Enum

An enumeration.

DEFAULT = None#
HTML = 'html'#
MARKDOWN = 'markdown'#
TEXT = 'text'#
class camel.types.enums.ModelPlatformType(value)[source]#

Bases: Enum

An enumeration.

ANTHROPIC = 'anthropic'#
AZURE = 'azure'#
DEFAULT = 'default'#
GEMINI = 'gemini'#
GROQ = 'groq'#
LITELLM = 'litellm'#
MISTRAL = 'mistral'#
OLLAMA = 'ollama'#
OPENAI = 'openai'#
OPENAI_COMPATIBILITY_MODEL = 'openai-compatibility-model'#
OPEN_SOURCE = 'open-source'#
REKA = 'reka'#
SAMBA = 'samba-nova'#
TOGETHER = 'together'#
VLLM = 'vllm'#
ZHIPU = 'zhipuai'#
property is_anthropic: bool#

Returns whether this platform is anthropic.

property is_azure: bool#

Returns whether this platform is azure.

property is_gemini: bool#

Returns whether this platform is Gemini.

property is_groq: bool#

Returns whether this platform is groq.

property is_litellm: bool#

Returns whether this platform is litellm.

property is_mistral: bool#

Returns whether this platform is mistral.

property is_ollama: bool#

Returns whether this platform is ollama.

property is_open_source: bool#

Returns whether this platform is opensource.

property is_openai: bool#

Returns whether this platform is openai.

property is_openai_compatibility_model: bool#

Returns whether this is a platform supporting openai compatibility

property is_reka: bool#

Returns whether this platform is Reka.

property is_samba: bool#

Returns whether this platform is Samba Nova.

property is_together: bool#

Returns whether this platform is together.

property is_vllm: bool#

Returns whether this platform is vllm.

property is_zhipuai: bool#

Returns whether this platform is zhipu.

class camel.types.enums.ModelType(value)[source]#

Bases: Enum

An enumeration.

CLAUDE_2_0 = 'claude-2.0'#
CLAUDE_2_1 = 'claude-2.1'#
CLAUDE_3_5_SONNET = 'claude-3-5-sonnet-20240620'#
CLAUDE_3_HAIKU = 'claude-3-haiku-20240307'#
CLAUDE_3_OPUS = 'claude-3-opus-20240229'#
CLAUDE_3_SONNET = 'claude-3-sonnet-20240229'#
CLAUDE_INSTANT_1_2 = 'claude-instant-1.2'#
GEMINI_1_5_FLASH = 'gemini-1.5-flash'#
GEMINI_1_5_PRO = 'gemini-1.5-pro'#
GLM_3_TURBO = 'glm-3-turbo'#
GLM_4 = 'glm-4'#
GLM_4V = 'glm-4v'#
GLM_4_OPEN_SOURCE = 'glm-4-open-source'#
GPT_3_5_TURBO = 'gpt-3.5-turbo'#
GPT_4 = 'gpt-4'#
GPT_4O = 'gpt-4o'#
GPT_4O_MINI = 'gpt-4o-mini'#
GPT_4_TURBO = 'gpt-4-turbo'#
GROQ_GEMMA_2_9B_IT = 'gemma2-9b-it'#
GROQ_GEMMA_7B_IT = 'gemma-7b-it'#
GROQ_LLAMA_3_1_405B = 'llama-3.1-405b-reasoning'#
GROQ_LLAMA_3_1_70B = 'llama-3.1-70b-versatile'#
GROQ_LLAMA_3_1_8B = 'llama-3.1-8b-instant'#
GROQ_LLAMA_3_70B = 'llama3-70b-8192'#
GROQ_LLAMA_3_8B = 'llama3-8b-8192'#
GROQ_MIXTRAL_8_7B = 'mixtral-8x7b-32768'#
LLAMA_2 = 'llama-2'#
LLAMA_3 = 'llama-3'#
MISTRAL_7B = 'open-mistral-7b'#
MISTRAL_CODESTRAL = 'codestral-latest'#
MISTRAL_CODESTRAL_MAMBA = 'open-codestral-mamba'#
MISTRAL_LARGE = 'mistral-large-latest'#
MISTRAL_MIXTRAL_8x22B = 'open-mixtral-8x22b'#
MISTRAL_MIXTRAL_8x7B = 'open-mixtral-8x7b'#
MISTRAL_NEMO = 'open-mistral-nemo'#
NEMOTRON_4_REWARD = 'nvidia/nemotron-4-340b-reward'#
O1_MINI = 'o1-mini'#
O1_PREVIEW = 'o1-preview'#
QWEN_2 = 'qwen-2'#
REKA_CORE = 'reka-core'#
REKA_EDGE = 'reka-edge'#
REKA_FLASH = 'reka-flash'#
STUB = 'stub'#
VICUNA = 'vicuna'#
VICUNA_16K = 'vicuna-16k'#
property is_anthropic: bool#

Returns whether this type of models is Anthropic-released model.

Returns:

Whether this type of models is anthropic.

Return type:

bool

property is_azure_openai: bool#

Returns whether this type of models is an OpenAI-released model from Azure.

property is_gemini: bool#

Returns whether this type of models is Gemini model.

Returns:

Whether this type of models is gemini.

Return type:

bool

property is_groq: bool#

Returns whether this type of models is served by Groq.

property is_mistral: bool#

Returns whether this type of models is served by Mistral.

property is_nvidia: bool#

Returns whether this type of models is Nvidia-released model.

Returns:

Whether this type of models is nvidia.

Return type:

bool

property is_open_source: bool#

Returns whether this type of models is open-source.

property is_openai: bool#

Returns whether this type of models is an OpenAI-released model.

property is_reka: bool#

Returns whether this type of models is Reka model.

Returns:

Whether this type of models is Reka.

Return type:

bool

property is_zhipuai: bool#

Returns whether this type of models is an ZhipuAI model.

property supports_tool_calling: bool#
property token_limit: int#

Returns the maximum token limit for a given model.

Returns:

The maximum token limit for the given model.

Return type:

int

validate_model_name(model_name: str) bool[source]#

Checks whether the model type and the model name matches.

Parameters:

model_name (str) – The name of the model, e.g. “vicuna-7b-v1.5”.

Returns:

Whether the model type matches the model name.

Return type:

bool

property value_for_tiktoken: str#
class camel.types.enums.OpenAIBackendRole(value)[source]#

Bases: Enum

An enumeration.

ASSISTANT = 'assistant'#
FUNCTION = 'function'#
SYSTEM = 'system'#
TOOL = 'tool'#
USER = 'user'#
class camel.types.enums.OpenAIImageType(value)[source]#

Bases: Enum

Image types supported by OpenAI vision model.

GIF = 'gif'#
JPEG = 'jpeg'#
JPG = 'jpg'#
PNG = 'png'#
WEBP = 'webp'#
class camel.types.enums.OpenAIImageTypeMeta(cls, bases, classdict, **kwds)[source]#

Bases: EnumMeta

class camel.types.enums.OpenAIVisionDetailType(value)[source]#

Bases: Enum

An enumeration.

AUTO = 'auto'#
HIGH = 'high'#
LOW = 'low'#
class camel.types.enums.OpenAPIName(value)[source]#

Bases: Enum

An enumeration.

BIZTOC = 'biztoc'#
COURSERA = 'coursera'#
CREATE_QR_CODE = 'create_qr_code'#
KLARNA = 'klarna'#
NASA_APOD = 'nasa_apod'#
OUTSCHOOL = 'outschool'#
SPEAK = 'speak'#
WEB_SCRAPER = 'web_scraper'#
class camel.types.enums.RoleType(value)[source]#

Bases: Enum

An enumeration.

ASSISTANT = 'assistant'#
CRITIC = 'critic'#
DEFAULT = 'default'#
EMBODIMENT = 'embodiment'#
USER = 'user'#
class camel.types.enums.StorageType(value)[source]#

Bases: Enum

An enumeration.

MILVUS = 'milvus'#
QDRANT = 'qdrant'#
class camel.types.enums.TaskType(value)[source]#

Bases: Enum

An enumeration.

AI_SOCIETY = 'ai_society'#
CODE = 'code'#
DEFAULT = 'default'#
EVALUATION = 'evaluation'#
GENERATE_TEXT_EMBEDDING_DATA = 'generate_text_embedding_data'#
IMAGE_CRAFT = 'image_craft'#
MISALIGNMENT = 'misalignment'#
MULTI_CONDITION_IMAGE_CRAFT = 'multi_condition_image_craft'#
OBJECT_RECOGNITION = 'object_recognition'#
ROLE_DESCRIPTION = 'role_description'#
SOLUTION_EXTRACTION = 'solution_extraction'#
TRANSLATION = 'translation'#
VIDEO_DESCRIPTION = 'video_description'#
class camel.types.enums.TerminationMode(value)[source]#

Bases: Enum

An enumeration.

ALL = 'all'#
ANY = 'any'#
class camel.types.enums.VectorDistance(value)[source]#

Bases: Enum

Distance metrics used in a vector database.

COSINE = 'cosine'#

//en.wikipedia.org/wiki/Cosine_similarity

Type:

Cosine similarity. https

DOT = 'dot'#

//en.wikipedia.org/wiki/Dot_product

Type:

Dot product. https

EUCLIDEAN = 'euclidean'#

//en.wikipedia.org/wiki/Euclidean_distance

Type:

Euclidean distance. https

class camel.types.enums.VoiceType(value)[source]#

Bases: Enum

An enumeration.

ALLOY = 'alloy'#
ECHO = 'echo'#
FABLE = 'fable'#
NOVA = 'nova'#
ONYX = 'onyx'#
SHIMMER = 'shimmer'#
property is_openai: bool#

Returns whether this type of voice is an OpenAI-released voice.

camel.types.openai_types module#

Module contents#

class camel.types.AudioModelType(value)[source]#

Bases: Enum

An enumeration.

TTS_1 = 'tts-1'#
TTS_1_HD = 'tts-1-hd'#
property is_openai: bool#

Returns whether this type of audio models is an OpenAI-released model.

class camel.types.ChatCompletion(**data: Any)[source]#

Bases: BaseModel

choices: List[Choice]#

A list of chat completion choices.

Can be more than one if n is greater than 1.

created: int#

The Unix timestamp (in seconds) of when the chat completion was created.

id: str#

A unique identifier for the chat completion.

model: str#

The model used for the chat completion.

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'choices': FieldInfo(annotation=List[Choice], required=True), 'created': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=str, required=True), 'model': FieldInfo(annotation=str, required=True), 'object': FieldInfo(annotation=Literal['chat.completion'], required=True), 'service_tier': FieldInfo(annotation=Union[Literal['scale', 'default'], NoneType], required=False, default=None), 'system_fingerprint': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'usage': FieldInfo(annotation=Union[CompletionUsage, NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

object: Literal['chat.completion']#

The object type, which is always chat.completion.

service_tier: Literal['scale', 'default'] | None#

The service tier used for processing the request.

This field is only included if the service_tier parameter is specified in the request.

system_fingerprint: str | None#

This fingerprint represents the backend configuration that the model runs with.

Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.

usage: CompletionUsage | None#

Usage statistics for the completion request.

class camel.types.ChatCompletionAssistantMessageParam[source]#

Bases: TypedDict

content: str | Iterable[ChatCompletionContentPartTextParam | ChatCompletionContentPartRefusalParam] | None#

The contents of the assistant message.

Required unless tool_calls or function_call is specified.

function_call: FunctionCall | None#

Deprecated and replaced by tool_calls.

The name and arguments of a function that should be called, as generated by the model.

name: str#

An optional name for the participant.

Provides the model information to differentiate between participants of the same role.

refusal: str | None#

The refusal message by the assistant.

role: Required[Literal['assistant']]#

The role of the messages author, in this case assistant.

tool_calls: Iterable[ChatCompletionMessageToolCallParam]#

The tool calls generated by the model, such as function calls.

class camel.types.ChatCompletionChunk(**data: Any)[source]#

Bases: BaseModel

choices: List[Choice]#

A list of chat completion choices.

Can contain more than one elements if n is greater than 1. Can also be empty for the last chunk if you set stream_options: {“include_usage”: true}.

created: int#

The Unix timestamp (in seconds) of when the chat completion was created.

Each chunk has the same timestamp.

id: str#

A unique identifier for the chat completion. Each chunk has the same ID.

model: str#

The model to generate the completion.

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'choices': FieldInfo(annotation=List[Choice], required=True), 'created': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=str, required=True), 'model': FieldInfo(annotation=str, required=True), 'object': FieldInfo(annotation=Literal['chat.completion.chunk'], required=True), 'service_tier': FieldInfo(annotation=Union[Literal['scale', 'default'], NoneType], required=False, default=None), 'system_fingerprint': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'usage': FieldInfo(annotation=Union[CompletionUsage, NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

object: Literal['chat.completion.chunk']#

The object type, which is always chat.completion.chunk.

service_tier: Literal['scale', 'default'] | None#

The service tier used for processing the request.

This field is only included if the service_tier parameter is specified in the request.

system_fingerprint: str | None#

This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.

usage: CompletionUsage | None#

An optional field that will only be present when you set stream_options: {“include_usage”: true} in your request. When present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.

class camel.types.ChatCompletionFunctionMessageParam[source]#

Bases: TypedDict

content: Required[str | None]#

The contents of the function message.

name: Required[str]#

The name of the function to call.

role: Required[Literal['function']]#

The role of the messages author, in this case function.

class camel.types.ChatCompletionMessage(**data: Any)[source]#

Bases: BaseModel

content: str | None#

The contents of the message.

function_call: FunctionCall | None#

Deprecated and replaced by tool_calls.

The name and arguments of a function that should be called, as generated by the model.

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'content': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'function_call': FieldInfo(annotation=Union[FunctionCall, NoneType], required=False, default=None), 'refusal': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'role': FieldInfo(annotation=Literal['assistant'], required=True), 'tool_calls': FieldInfo(annotation=Union[List[ChatCompletionMessageToolCall], NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

refusal: str | None#

The refusal message generated by the model.

role: Literal['assistant']#

The role of the author of this message.

tool_calls: List[ChatCompletionMessageToolCall] | None#

The tool calls generated by the model, such as function calls.

class camel.types.ChatCompletionSystemMessageParam[source]#

Bases: TypedDict

content: Required[str | Iterable[ChatCompletionContentPartTextParam]]#

The contents of the system message.

name: str#

An optional name for the participant.

Provides the model information to differentiate between participants of the same role.

role: Required[Literal['system']]#

The role of the messages author, in this case system.

class camel.types.ChatCompletionUserMessageParam[source]#

Bases: TypedDict

content: Required[str | Iterable[ChatCompletionContentPartTextParam | ChatCompletionContentPartImageParam]]#

The contents of the user message.

name: str#

An optional name for the participant.

Provides the model information to differentiate between participants of the same role.

role: Required[Literal['user']]#

The role of the messages author, in this case user.

class camel.types.Choice(**data: Any)[source]#

Bases: BaseModel

finish_reason: Literal['stop', 'length', 'tool_calls', 'content_filter', 'function_call']#

The reason the model stopped generating tokens.

This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool, or function_call (deprecated) if the model called a function.

index: int#

The index of the choice in the list of choices.

logprobs: ChoiceLogprobs | None#

Log probability information for the choice.

message: ChatCompletionMessage#

A chat completion message generated by the model.

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'finish_reason': FieldInfo(annotation=Literal['stop', 'length', 'tool_calls', 'content_filter', 'function_call'], required=True), 'index': FieldInfo(annotation=int, required=True), 'logprobs': FieldInfo(annotation=Union[ChoiceLogprobs, NoneType], required=False, default=None), 'message': FieldInfo(annotation=ChatCompletionMessage, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class camel.types.CompletionUsage(**data: Any)[source]#

Bases: BaseModel

completion_tokens: int#

Number of tokens in the generated completion.

completion_tokens_details: CompletionTokensDetails | None#

Breakdown of tokens used in a completion.

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'defer_build': True, 'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'completion_tokens': FieldInfo(annotation=int, required=True), 'completion_tokens_details': FieldInfo(annotation=Union[CompletionTokensDetails, NoneType], required=False, default=None), 'prompt_tokens': FieldInfo(annotation=int, required=True), 'total_tokens': FieldInfo(annotation=int, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

prompt_tokens: int#

Number of tokens in the prompt.

total_tokens: int#

Total number of tokens used in the request (prompt + completion).

class camel.types.EmbeddingModelType(value)[source]#

Bases: Enum

An enumeration.

MISTRAL_EMBED = 'mistral-embed'#
TEXT_EMBEDDING_3_LARGE = 'text-embedding-3-large'#
TEXT_EMBEDDING_3_SMALL = 'text-embedding-3-small'#
TEXT_EMBEDDING_ADA_2 = 'text-embedding-ada-002'#
property is_mistral: bool#

Returns whether this type of models is an Mistral-released model.

property is_openai: bool#

Returns whether this type of models is an OpenAI-released model.

property output_dim: int#
class camel.types.ModelPlatformType(value)[source]#

Bases: Enum

An enumeration.

ANTHROPIC = 'anthropic'#
AZURE = 'azure'#
DEFAULT = 'default'#
GEMINI = 'gemini'#
GROQ = 'groq'#
LITELLM = 'litellm'#
MISTRAL = 'mistral'#
OLLAMA = 'ollama'#
OPENAI = 'openai'#
OPENAI_COMPATIBILITY_MODEL = 'openai-compatibility-model'#
OPEN_SOURCE = 'open-source'#
REKA = 'reka'#
SAMBA = 'samba-nova'#
TOGETHER = 'together'#
VLLM = 'vllm'#
ZHIPU = 'zhipuai'#
property is_anthropic: bool#

Returns whether this platform is anthropic.

property is_azure: bool#

Returns whether this platform is azure.

property is_gemini: bool#

Returns whether this platform is Gemini.

property is_groq: bool#

Returns whether this platform is groq.

property is_litellm: bool#

Returns whether this platform is litellm.

property is_mistral: bool#

Returns whether this platform is mistral.

property is_ollama: bool#

Returns whether this platform is ollama.

property is_open_source: bool#

Returns whether this platform is opensource.

property is_openai: bool#

Returns whether this platform is openai.

property is_openai_compatibility_model: bool#

Returns whether this is a platform supporting openai compatibility

property is_reka: bool#

Returns whether this platform is Reka.

property is_samba: bool#

Returns whether this platform is Samba Nova.

property is_together: bool#

Returns whether this platform is together.

property is_vllm: bool#

Returns whether this platform is vllm.

property is_zhipuai: bool#

Returns whether this platform is zhipu.

class camel.types.ModelType(value)[source]#

Bases: Enum

An enumeration.

CLAUDE_2_0 = 'claude-2.0'#
CLAUDE_2_1 = 'claude-2.1'#
CLAUDE_3_5_SONNET = 'claude-3-5-sonnet-20240620'#
CLAUDE_3_HAIKU = 'claude-3-haiku-20240307'#
CLAUDE_3_OPUS = 'claude-3-opus-20240229'#
CLAUDE_3_SONNET = 'claude-3-sonnet-20240229'#
CLAUDE_INSTANT_1_2 = 'claude-instant-1.2'#
GEMINI_1_5_FLASH = 'gemini-1.5-flash'#
GEMINI_1_5_PRO = 'gemini-1.5-pro'#
GLM_3_TURBO = 'glm-3-turbo'#
GLM_4 = 'glm-4'#
GLM_4V = 'glm-4v'#
GLM_4_OPEN_SOURCE = 'glm-4-open-source'#
GPT_3_5_TURBO = 'gpt-3.5-turbo'#
GPT_4 = 'gpt-4'#
GPT_4O = 'gpt-4o'#
GPT_4O_MINI = 'gpt-4o-mini'#
GPT_4_TURBO = 'gpt-4-turbo'#
GROQ_GEMMA_2_9B_IT = 'gemma2-9b-it'#
GROQ_GEMMA_7B_IT = 'gemma-7b-it'#
GROQ_LLAMA_3_1_405B = 'llama-3.1-405b-reasoning'#
GROQ_LLAMA_3_1_70B = 'llama-3.1-70b-versatile'#
GROQ_LLAMA_3_1_8B = 'llama-3.1-8b-instant'#
GROQ_LLAMA_3_70B = 'llama3-70b-8192'#
GROQ_LLAMA_3_8B = 'llama3-8b-8192'#
GROQ_MIXTRAL_8_7B = 'mixtral-8x7b-32768'#
LLAMA_2 = 'llama-2'#
LLAMA_3 = 'llama-3'#
MISTRAL_7B = 'open-mistral-7b'#
MISTRAL_CODESTRAL = 'codestral-latest'#
MISTRAL_CODESTRAL_MAMBA = 'open-codestral-mamba'#
MISTRAL_LARGE = 'mistral-large-latest'#
MISTRAL_MIXTRAL_8x22B = 'open-mixtral-8x22b'#
MISTRAL_MIXTRAL_8x7B = 'open-mixtral-8x7b'#
MISTRAL_NEMO = 'open-mistral-nemo'#
NEMOTRON_4_REWARD = 'nvidia/nemotron-4-340b-reward'#
O1_MINI = 'o1-mini'#
O1_PREVIEW = 'o1-preview'#
QWEN_2 = 'qwen-2'#
REKA_CORE = 'reka-core'#
REKA_EDGE = 'reka-edge'#
REKA_FLASH = 'reka-flash'#
STUB = 'stub'#
VICUNA = 'vicuna'#
VICUNA_16K = 'vicuna-16k'#
property is_anthropic: bool#

Returns whether this type of models is Anthropic-released model.

Returns:

Whether this type of models is anthropic.

Return type:

bool

property is_azure_openai: bool#

Returns whether this type of models is an OpenAI-released model from Azure.

property is_gemini: bool#

Returns whether this type of models is Gemini model.

Returns:

Whether this type of models is gemini.

Return type:

bool

property is_groq: bool#

Returns whether this type of models is served by Groq.

property is_mistral: bool#

Returns whether this type of models is served by Mistral.

property is_nvidia: bool#

Returns whether this type of models is Nvidia-released model.

Returns:

Whether this type of models is nvidia.

Return type:

bool

property is_open_source: bool#

Returns whether this type of models is open-source.

property is_openai: bool#

Returns whether this type of models is an OpenAI-released model.

property is_reka: bool#

Returns whether this type of models is Reka model.

Returns:

Whether this type of models is Reka.

Return type:

bool

property is_zhipuai: bool#

Returns whether this type of models is an ZhipuAI model.

property supports_tool_calling: bool#
property token_limit: int#

Returns the maximum token limit for a given model.

Returns:

The maximum token limit for the given model.

Return type:

int

validate_model_name(model_name: str) bool[source]#

Checks whether the model type and the model name matches.

Parameters:

model_name (str) – The name of the model, e.g. “vicuna-7b-v1.5”.

Returns:

Whether the model type matches the model name.

Return type:

bool

property value_for_tiktoken: str#
class camel.types.OpenAIBackendRole(value)[source]#

Bases: Enum

An enumeration.

ASSISTANT = 'assistant'#
FUNCTION = 'function'#
SYSTEM = 'system'#
TOOL = 'tool'#
USER = 'user'#
class camel.types.OpenAIImageType(value)[source]#

Bases: Enum

Image types supported by OpenAI vision model.

GIF = 'gif'#
JPEG = 'jpeg'#
JPG = 'jpg'#
PNG = 'png'#
WEBP = 'webp'#
class camel.types.OpenAIVisionDetailType(value)[source]#

Bases: Enum

An enumeration.

AUTO = 'auto'#
HIGH = 'high'#
LOW = 'low'#
class camel.types.OpenAPIName(value)[source]#

Bases: Enum

An enumeration.

BIZTOC = 'biztoc'#
COURSERA = 'coursera'#
CREATE_QR_CODE = 'create_qr_code'#
KLARNA = 'klarna'#
NASA_APOD = 'nasa_apod'#
OUTSCHOOL = 'outschool'#
SPEAK = 'speak'#
WEB_SCRAPER = 'web_scraper'#
class camel.types.RoleType(value)[source]#

Bases: Enum

An enumeration.

ASSISTANT = 'assistant'#
CRITIC = 'critic'#
DEFAULT = 'default'#
EMBODIMENT = 'embodiment'#
USER = 'user'#
class camel.types.StorageType(value)[source]#

Bases: Enum

An enumeration.

MILVUS = 'milvus'#
QDRANT = 'qdrant'#
class camel.types.TaskType(value)[source]#

Bases: Enum

An enumeration.

AI_SOCIETY = 'ai_society'#
CODE = 'code'#
DEFAULT = 'default'#
EVALUATION = 'evaluation'#
GENERATE_TEXT_EMBEDDING_DATA = 'generate_text_embedding_data'#
IMAGE_CRAFT = 'image_craft'#
MISALIGNMENT = 'misalignment'#
MULTI_CONDITION_IMAGE_CRAFT = 'multi_condition_image_craft'#
OBJECT_RECOGNITION = 'object_recognition'#
ROLE_DESCRIPTION = 'role_description'#
SOLUTION_EXTRACTION = 'solution_extraction'#
TRANSLATION = 'translation'#
VIDEO_DESCRIPTION = 'video_description'#
class camel.types.TerminationMode(value)[source]#

Bases: Enum

An enumeration.

ALL = 'all'#
ANY = 'any'#
class camel.types.VectorDistance(value)[source]#

Bases: Enum

Distance metrics used in a vector database.

COSINE = 'cosine'#

//en.wikipedia.org/wiki/Cosine_similarity

Type:

Cosine similarity. https

DOT = 'dot'#

//en.wikipedia.org/wiki/Dot_product

Type:

Dot product. https

EUCLIDEAN = 'euclidean'#

//en.wikipedia.org/wiki/Euclidean_distance

Type:

Euclidean distance. https

class camel.types.VoiceType(value)[source]#

Bases: Enum

An enumeration.

ALLOY = 'alloy'#
ECHO = 'echo'#
FABLE = 'fable'#
NOVA = 'nova'#
ONYX = 'onyx'#
SHIMMER = 'shimmer'#
property is_openai: bool#

Returns whether this type of voice is an OpenAI-released voice.