> For the complete documentation index, see [llms.txt](https://aiv-group.gitbook.io/mindmaid-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aiv-group.gitbook.io/mindmaid-documentation/tutorials/huong-dan-su-dung-function-calling.md).

# Hướng dẫn sử dụng function calling

* Trong menu cài đặt "Function calling" gọi tắt là FC có thể tùy chọn tạo một FC hoặc nhiều FC để thực hiện các tác vụ đặc biệt ví dụ như: Lấy số điện thoại, email người dùng nhập vào, ...
* Một FC có thể viết như sau:

```
{
  "name": "mindmaid_phone_email", # Tên của Function
  "description": "Get name or phone number or email address of the user", # Mô tả Function
  "parameters": {
    "type": "object", # Loại parameter nên để mặc định object
    "required": [ # Yêu cầu các trường nào bắt buộc phải có dữ liệu ở đây là location
      "location"
    ],
    "properties": { # Chi tiết các trường thông tin cần lấy
      "name": { # Tên (Cần viết tiếng anh không dấu và cách nhau bằng _)
        "type": "string", # Loại dữ liệu của trường ở đây là string
        "description": "the name of the user" # Mô tả trường dữ liệu này là gì (càng chi tiết càng tốt và nên có ví dụ)
      },
      "email": { 
        "type": "string",
        "description": "the email address of the user"
      },
      "phone": {
        "type": "string",
        "description": "The phone number of Vietnamese"
      }
    }
  }
}
```

* Lưu ý name của function calling không nên viết trùng nhau khi nhập nhiều function calling cho một gpts


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aiv-group.gitbook.io/mindmaid-documentation/tutorials/huong-dan-su-dung-function-calling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
