> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.messages.func message

<a id="camel.messages.func_message" />

<a id="camel.messages.func_message.FunctionCallingMessage" />

## FunctionCallingMessage

```python theme={"system"}
class FunctionCallingMessage(BaseMessage):
```

Class for message objects used specifically for
function-related messages.

**Parameters:**

* **func\_name** (Optional\[str]): The name of the function used. (default: :obj:`None`)
* **args** (Optional\[Dict]): The dictionary of arguments passed to the function. (default: :obj:`None`)
* **result** (Optional\[Any]): The result of function execution. (default: :obj:`None`)
* **tool\_call\_id** (Optional\[str]): The ID of the tool call, if available. (default: :obj:`None`)
* **mask\_output** (Optional\[bool]): Whether to return a sanitized placeholder instead of the raw tool output. (default: :obj:`False`)
* **extra\_content** (Optional\[Dict\[str, Any]]): Additional content associated with the tool call. (default: :obj:`None`)

<a id="camel.messages.func_message.FunctionCallingMessage.to_openai_message" />

### to\_openai\_message

```python theme={"system"}
def to_openai_message(self, role_at_backend: OpenAIBackendRole):
```

Converts the message to an :obj:`OpenAIMessage` object.

**Parameters:**

* **role\_at\_backend** (OpenAIBackendRole): The role of the message in OpenAI chat system.

**Returns:**

OpenAIMessage: The converted :obj:`OpenAIMessage` object.

<a id="camel.messages.func_message.FunctionCallingMessage.to_sharegpt" />

### to\_sharegpt

```python theme={"system"}
def to_sharegpt(
    self,
    function_format: Optional[FunctionCallFormatter[ToolCall, ToolResponse]] = None
):
```

Convert FunctionCallingMessage to ShareGPT message.

<a id="camel.messages.func_message.FunctionCallingMessage.to_openai_assistant_message" />

### to\_openai\_assistant\_message

```python theme={"system"}
def to_openai_assistant_message(self):
```

**Returns:**

OpenAIAssistantMessage: The converted :obj:`OpenAIAssistantMessage`
object.

<a id="camel.messages.func_message.FunctionCallingMessage.to_openai_tool_message" />

### to\_openai\_tool\_message

```python theme={"system"}
def to_openai_tool_message(self):
```

**Returns:**

OpenAIToolMessageParam: The converted
:obj:`OpenAIToolMessageParam` object with its role being
"tool".

<a id="camel.messages.func_message.FunctionCallingMessage.to_dict" />

### to\_dict

```python theme={"system"}
def to_dict(self):
```

**Returns:**

dict: The converted dictionary.
