# Installations

After installing the phone in resources, all you need to do is download and install the requirements. If you are using QB or ESX, the plugin will automatically make all the settings without you having to make any settings. SQL installations are also included. However, if you are using a Custom core, there may be some things you need to change.

{% hint style="info" %}
**Good to know:** API Setup requires developer experience and it is recommended to get help from a developer.
{% endhint %}

## Doing the phone setup

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

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.

<pre class="language-lua" data-title="server.cfg"><code class="lang-lua"><strong>ensure oxmysql -- Requirements
</strong>ensure ox_lib -- Requirements
<strong>
</strong><strong>ensure stache-phone
</strong></code></pre>

## Installing Requirements

Using 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.

For some functions [ox\_lib ](https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip)is used (<mark style="color:red;">Latest version</mark>!), download it from this link and put it in the Resources Folder. Start before the phone.

## Making adjustments

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

## 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/jo2BZHOCQrYPICrfpPuM" 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/9HCMJWyxtpNbhkbhhLSU" alt=""><figcaption></figcaption></figure>

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

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

Then get the api key you created.

<figure><img src="/files/itl7ns37bIlhcMnvxQ2e" 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="https://i.imgur.com/nqpIGD6.png" alt=""><figcaption></figcaption></figure>

Create a New One.

<figure><img src="https://i.imgur.com/EqSZr4O.png" alt=""><figcaption></figcaption></figure>

Make your arrangements and create.

Then go to the Overview section.

<figure><img src="https://i.imgur.com/RBSBCKd.png" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/dXWwWyepgifpqfJlYPIO" 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/2Z4wtV3EkuuL9jxpTMKJ" alt=""><figcaption></figcaption></figure>

Then create a translator in the same way.

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

Go to this section to get our translator keys.

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

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

<figure><img src="/files/cwGviDGeTp4kwKiznbcF" 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`.

{% tabs %}
{% tab title="Azure" %}
We fill in the necessary fields with the information we have.

Like This.

<figure><img src="/files/Y9zwoLrN3i8P63MfAWRL" alt=""><figcaption><p>Configuration/Variables.lua</p></figcaption></figure>
{% endtab %}
{% endtabs %}

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

[Siri Settings](/stache-phone/making-adjustments/config-js.md#sirisettings), [Advanced 911](/stache-phone/making-adjustments/config-js.md#advanced911system)


---

# 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://stachemsc.gitbook.io/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.
