Privacy Policy

1. Introduction

This Privacy Policy describes how we collect, use, and protect your personal information when you use our chatbot, which interacts with the Gemini AI API and stores your questions in our database.

2. Information Collected

When using our chatbot, we collect the following types of information:

  • Conversation Information: All messages you send and receive through the chatbot.
  • Identification Data: We may collect data such as IP address and geographic location information.

3. Use of Information

The information collected is used for the following purposes:

  • Interaction with the AI API: Your messages are sent to the Gemini API to generate appropriate responses.
  • Question Storage: Your questions are stored in our database for analysis and service improvement purposes.

4. Information Sharing

We do not share your personal information with third parties, except in the following cases:

  • Service Providers: We may share information with vendors who help us operate our service, such as the Gemini API.
  • Legal Compliance: We may disclose information to comply with legal obligations or respond to legal processes.

5. Information Security

We implement appropriate security measures to protect your information from unauthorized access, alteration, disclosure, or destruction. These measures include:

  • Encryption: Use of encryption to protect data in transit.
  • Restricted Access: Access to information is limited to employees and partners who need this information to operate our service.

6. Your Rights

You have the right to:

  • Access and Correct: Request access to your personal information and correct inaccurate data.
  • Delete Data: Request the deletion of your personal information, subject to certain conditions.
  • Withdraw Consent: Withdraw your consent to the processing of your personal information.

7. Changes to the Privacy Policy

We reserve the right to update this Privacy Policy at any time. We will notify you of any significant changes through our website or other appropriate communication channels.

8. Contact

If you have any questions about this Privacy Policy, please contact us at [email protected]

9. Consent

By using our service, you agree to the collection and use of your information as described in this Privacy Policy.

This Privacy Policy has been created to ensure that your personal information is treated with security and respect. We appreciate your trust and are committed to protecting your privacy.

Distance Matrix

Example 2 – Finding the nearest vehicle assistance

In the vehicle insurance industry, it is very common to use the Distance Matrix API to reduce vehicle assistance service times.

Since the broken-down vehicle and the tow trucks share a latitude/longitude location, when the broken-down vehicle calls for assistance, the system can use the Distance Matrix API to decide which tow truck will arrive first.

In this example, the destination is two broken-down vehicles and the origin is five tow trucks:

{
    "calculationMode": "THE_FASTEST",
    "destinations": [
        {
            "latitude": -23.5654032,
            "longitude": -46.62117004,
            "siteId": "veiculo1-Cambuci"
        },
        {
            "latitude": -23.574136,
            "longitude": -46.655844,
            "siteId": "veiculo2-Jardins"
        }
    ],
    "origins": [
        {
            "latitude": -23.58664317,
            "longitude": -46.63833618,
            "siteId": "guincho1-VilaMariana"
        },
        {
            "latitude": -23.562412,
            "longitude": -46.638788,
            "siteId": "guincho2-Liberdade"
        },
        {
            "latitude": -23.55363650451996,
            "longitude": -46.620810158377516,
            "siteId": "guincho3-Mooca"
        },
        {
            "latitude": -23.561603,
            "longitude": -46.655840,
            "siteId": "guincho4-MASP"
        },
        {
            "latitude": -23.535016,
            "longitude": -46.735701,
            "siteId": "guincho5-CEAGESP"
        }
    ],
    "tripProfile": "MAPLINK"
}

The response returns the array of objects elements, where each object represents the relationship between each source and destination pair.

In this case, the distance between each winch and vehicle will be returned. This way you can identify which tow truck will be able to provide assistance quickly.

Each object on elements will have the following information:

  • origin – Origin point identifier;
  • destination – Identifier of the destination point;
  • distance – Total distance in meters;
  • nominalDuration – Total duration in seconds;
  • averageSpeed – Average speed of the route between origin and destination in km/h.

The full response can be found below:

{
    "id": "60761bd2b966b04b48d1019c",
    "clientId": "maplink",
    "elements": [
        {
            "origin": "guincho1-VilaMariana",
            "destination": "veiculo1-Cambuci",
            "distance": 3569,
            "nominalDuration": 643,
            "averageSpeed": 19.98
        },
        {
            "origin": "guincho1-VilaMariana",
            "destination": "veiculo2-Jardins",
            "distance": 3711,
            "nominalDuration": 365,
            "averageSpeed": 36.6
        },
        {
            "origin": "guincho2-Liberdade",
            "destination": "veiculo1-Cambuci",
            "distance": 4209,
            "nominalDuration": 514,
            "averageSpeed": 29.48
        },
        {
            "origin": "guincho2-Liberdade",
            "destination": "veiculo2-Jardins",
            "distance": 3710,
            "nominalDuration": 336,
            "averageSpeed": 39.75
        },
        {
            "origin": "guincho3-Mooca",
            "destination": "veiculo1-Cambuci",
            "distance": 2787,
            "nominalDuration": 426,
            "averageSpeed": 23.55
        },
        {
            "origin": "guincho3-Mooca",
            "destination": "veiculo2-Jardins",
            "distance": 5265,
            "nominalDuration": 490,
            "averageSpeed": 38.68
        },
        {
            "origin": "guincho4-MASP",
            "destination": "veiculo1-Cambuci",
            "distance": 6842,
            "nominalDuration": 859,
            "averageSpeed": 28.67
        },
        {
            "origin": "guincho4-MASP",
            "destination": "veiculo2-Jardins",
            "distance": 2082,
            "nominalDuration": 305,
            "averageSpeed": 24.57
        },
        {
            "origin": "guincho5-CEAGESP",
            "destination": "veiculo1-Cambuci",
            "distance": 15608,
            "nominalDuration": 1588,
            "averageSpeed": 35.38
        },
        {
            "origin": "guincho5-CEAGESP",
            "destination": "veiculo2-Jardins",
            "distance": 11217,
            "nominalDuration": 1057,
            "averageSpeed": 38.2
        }
    ],
    "createdAt": 1618353108108
}

In a tabular view of the result, it is possible to conclude the following:

  1. The vehicle "veiculo1-Cambuci" will receive faster and closer service from the tow truck "guincho3-Mooca";
  2. The vehicle "veiculo2-Jardins" will receive faster and closer service from the tow truck "guincho4-MASP".
origindestinationdistancenominalDurationaverageSpeed
guincho1-VilaMarianaveiculo1-Cambuci356964319.98
guincho2-Liberdadeveiculo1-Cambuci420951429.48
guincho3-Moocaveiculo1-Cambuci278742623.55
guincho4-MASPveiculo1-Cambuci684285928.67
guincho5-CEAGESPveiculo1-Cambuci15608158835.38
guincho1-VilaMarianaveiculo1-Jardins371136536.6
guincho2-Liberdadeveiculo1-Jardins371033639.75
guincho3-Moocaveiculo1-Jardins526549038.68
guincho4-MASPveiculo1-Jardins208230524.57
guincho5-CEAGESPveiculo1-Jardins11217105738.2
Result of the request organized in a table