# Manual mode (complete)

The manual completion mode is a thin layer on top of the OpenAI API's completion endpoint. The completion endpoint returns an answer/a completion for a prompt that the user provides. The mode allows you to customize all aspects of the model inference.

{% hint style="info" %}
The completion endpoint is considered legacy by OpenAI. [Click](https://platform.openai.com/docs/models/model-endpoint-compatibility) here for a list of supported models. The underlying versions are GPT-3.5 and before.
{% endhint %}

* **Model**: You can select any model from OpenAI that supports the `completions` endpoint. A list of supported models can be found [here](https://platform.openai.com/docs/models/model-endpoint-compatibility). We recommend to use `text-davinci-003`. It is the latest model that supports this endpoint.
* **Max tokens**: This defines the number of tokens in the output of the model. Depending on the model, there is a limit to the number of tokens that a model can take as input from the prompt and the output of the model, i.e. the number of tokens in the input + max tokens should not exceed this limit.
* **Temperature**: The temperature defines the variability/creativity of the model's response. It's value lies between -2 and 2.
* **Frequency penalty and presence penality**: Both of these parameters together determine how repetitive the answer is. This includes repetitions in words and the content of the text. A positive presence penalty penalizes repetitive tokens while a positive frequency penalty decreases the likelihood that the model repeats it's verbalism. More info can be found [here](https://platform.openai.com/docs/api-reference/parameter-details).
* **Prompt**: The most important part of the action is the prompt. The prompt contains the instructions for the language model. This could be as simple as "Write a poem about Berlin in the summer." or as complex as "Imagine you are a technical writer for a SaaS company. You write step-by-step guides based on the internal product documentation. Here are examples of your work `{{state.examples}}`. Write an step-by-step guide based on these docs: `{{docs.value}}`:". As you can see, you are free to feed in any dynamic value your app or data source using moustache syntax, i.e. `{{}}`.

<figure><img src="/files/82c8WBv8nYYlbUk0yZmA" alt=""><figcaption></figcaption></figure>


---

# 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.uify.io/integrations/openai/manual-mode-complete.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.
