# Installations

{% hint style="info" %}
If SQL Tables are not created automatically or there is any error, please open a ticket on discord.
{% endhint %}

{% hint style="info" %}
Siri and the Advanced 911 system require AI API setup. For this you need to do extra setup please follow the documentation to install it.
{% endhint %}

## Detailed phone setup and AI setup guide video

{% embed url="<https://youtu.be/zK86dHvlDB4>" %}

## Doing the phone setup

Download the latest version of the script via [Keymaster](https://keymaster.fivem.net/).

Extract the folder in the zipped file you downloaded to your resources folder.

Inside the Resources folder you will see a folder named **stache-phone**. Define this folder in server.cfg

{% hint style="danger" %}
Make sure the name of the script is \``stache-phone`\` do not change it!
{% endhint %}

### Make sure the requirements are up to date!

<figure><img src="/files/3L194qHCMEyraUwOUPaD" alt=""><figcaption><p>inside ox_lib/fxmanifest.lua</p></figcaption></figure>

Check the ox\_lib version and check the latest version from [this link](https://github.com/overextended/ox_lib/releases). Make sure you are using the latest version. If you are using a very old version, please update.

Using [oxmysql](https://github.com/overextended/oxmysql) as database driver. To install it, download it from [this](https://github.com/overextended/oxmysql/releases/latest/download/oxmysql.zip) link and drop it into Resources. Start before the phone.

{% hint style="warning" %}
Requirements need to be start before the phone
{% endhint %}

{% tabs %}
{% tab title="server.cfg" %}

```lua
ensure oxmysql -- Requirements
ensure qb-core / es_extended -- Core Defination
ensure ox_lib -- Requirements
ensure inventory -- If you are using an inventory

ensure stache-phone
```

{% endtab %}
{% endtabs %}

### Making adjustments

After performing the above installations, you can take a look at the necessary settings if you need them.

{% content-ref url="/pages/xYV9srzB7CWUQA3tDXAW" %}
[Configuration](/0resmon/stache-resources/stache-phone/configuration.md)
{% endcontent-ref %}

## Using the AI Service

Azure and Wolfram Keys are needed to use the AI Service. The Azure service normally offers paid services, but **free services** are available. You can choose according to your server capacity. These are the most available methods for Fivem at the moment. If you are a large community, you can optionally install wit, but create a support request for this because a special AI training is required before using wit.

### Getting Wolfram Key

Wolfram is a free service. However, a special definition is required for each server. It is necessary for the AI service to communicate in real time.

Go to the [Wolfram](https://www.wolframalpha.com/). And click this.

<figure><img src="/files/StCZlISJ5ItaaYQsJIpN" alt=""><figcaption><p>Top Right on the page.</p></figcaption></figure>

Create an account and log in. Then go to this [page](https://developer.wolframalpha.com/).

<figure><img src="/files/MdarsuYJ4HWBq54lYVlo" alt=""><figcaption></figcaption></figure>

Fill in the blanks as you like and select the type as in the picture.

<figure><img src="/files/1iq07ym0unnvfBuiliVH" alt=""><figcaption></figcaption></figure>

Then get the api key you created.

<figure><img src="/files/QXBHZ4wMBwolgiEbC7WO" alt=""><figcaption><p>Configuration/Variables.lua</p></figcaption></figure>

Place the app id you received here.

### Install the Azure Service

If you are going to use azure as an Api (remember, it is subject to certain fees, but the quality is high.)

Go to the [Azure portal](https://portal.azure.com/). And make this search.

<figure><img src="/files/ZMn8FYveoj5r6bXXaMRW" alt=""><figcaption></figcaption></figure>

Create a New One.

<figure><img src="/files/mdd4eGtoY4iXxNTIoJY0" alt=""><figcaption></figcaption></figure>

Make your arrangements and create.

Then go to the Overview section.

<figure><img src="/files/pBY7j6nw9A0Rq6TC5L63" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/lvYt686gXQXoXfTUGSuY" alt=""><figcaption><p>Configuration/Variables.lua</p></figcaption></figure>

The keys up to this point will go to the places indicated above.

Then go to the azure portal again and do the following search.

<figure><img src="/files/ztn1Qw2pybsgedVdXVIn" alt=""><figcaption></figcaption></figure>

Then create a translator in the same way.

<figure><img src="/files/XbKpSgKYvzS3XhM1gAyQ" alt=""><figcaption></figcaption></figure>

Go to this section to get our translator keys.

<figure><img src="/files/WdQ9Wep7Uc4aSd3PFVDL" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/wBtyiyuCK9pdMyGaISmu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/920deBLtNaGswVeqN9hY" alt=""><figcaption><p>Configuration/Variables.lua</p></figcaption></figure>

Place the translator keys you received in this section.

{% hint style="info" %}
Proceed to the [Lua Definitions ](#api-key-definitions-on-the-lua-side)Section with these key and region info.
{% endhint %}

### Api Key Definitions on the Lua Side

We are making these edits in `Configuration/Variables.lua`.

<figure><img src="/files/aQngTA7194Bd4q6flQ0D" alt=""><figcaption><p>Configuration/Variables.lua</p></figcaption></figure>

After making all your Lua-side settings, you need to make changes to `ui/config.js` to use ai services.

{% tabs %}
{% tab title="For Siri" %}
To activate the Siri system, first complete the above installations.

<figure><img src="/files/2iViQs4mZB6gQDaBr3eH" alt=""><figcaption><p>ui/config.js</p></figcaption></figure>
{% endtab %}

{% tab title="For 911" %}

<figure><img src="/files/r0ldKMKXw4jV7u2Aik0t" alt=""><figcaption><p>ui/config.js</p></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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://docs.0resmon.org/0resmon/stache-resources/stache-phone/installations.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.
