# Using LM Studio

You can find the full LM Studio documentation [here](https://lmstudio.ai/).

### Step 1 - Install LM Studio

Navigate to [the LM Studio website](https://lmstudio.ai/) and follow the instructions to install the GUI.

### Step 2 - Download a model

Using the GUI, download a model from the LM Studio library. If you don't know which to pick, try `TheBloke/openchat_3.5.gguf` version `openchat_3.5.Q5.K_M.gguf`.

### Step 3 - Start the server

On the left side of the GUI, click the "Local Server" button. Then, in the dropdown on the top of the screen, select the model you downloaded.

Next, in the Server Options pane, ensure that Cross-Origin-Resource-Sharing (CORS) is enabled.

Finally, click "Start Server".

### Step 4 - Enable the server in the client

First select `ChatGPT` as the backend in the client:

```md
settings -> ChatBot -> ChatBot Backend -> ChatGPT
```

Then configure `ChatGPT` to use the LM Studio server:

```md
settings -> ChatBot -> ChatGPT

```

Set `OpenAI URL` to `http://localhost:8080` and `OpenAI Key` to `default`. If you changed the port in the LM Studio GUI, use that port instead of `8080`.


---

# 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.heyamica.com/connecting-llms-your-core-ai-chatbot-model/using-lm-studio.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.
