# Generative

Currently, we support the following AI models:

* [Open AI GPT](#open-ai-gpt)
* [Open AI DALL·E](#open-ai-dall-e)
* [Akool Faceswap](#akool-faceswap)

## Open AI GPT

<figure><img src="/files/rVzOsl6L76ZWv0UO81JL" alt="" width="353"><figcaption><p>Open AI LLM</p></figcaption></figure>

### Parameters:

* **Model**

<table><thead><tr><th width="167">Model</th><th width="251">Description</th><th width="144">Max Tokens</th><th>Training Date</th></tr></thead><tbody><tr><td>gpt-4</td><td>More capable than gpt-3.5 and able to perform more complex tasks and return more precise answers.</td><td>8,192 tokens</td><td>Up to Sep 2021</td></tr><tr><td>gpt-3.5 turbo</td><td>Can perform most tasks and return well-structured answers.</td><td>4,096 tokens</td><td>Up to Sep 2021</td></tr><tr><td>DALL·E</td><td>Create realistic images and art from a description.</td><td> -</td><td>-</td></tr></tbody></table>

Check [Open AI doc](https://platform.openai.com/docs/models/overview) for more details of the gpt models.

* **Role**

<table><thead><tr><th width="149.5">Role</th><th>Description</th></tr></thead><tbody><tr><td>system</td><td>It sets up the context and behavior of the assistant.</td></tr><tr><td>user</td><td>It's used to give instructions to the assistant. It is typically generated by the end user. But you as a developer can also provide some potential user prompts beforehand.</td></tr><tr><td>assistant</td><td>We provide the assistant with some information in advance so that it gives us the response we expect from the API.</td></tr></tbody></table>

* **Temperature**

Lower values for temperature result in more consistent outputs, while higher values generate more diverse and creative results. Select a temperature value based on the desired trade-off between coherence and creativity for your specific application.

* **Max Token**

The character count of your request. Try to set the `max_tokens` value as close to your expected response size as possible.

* **Prompt**

A prompt is an instruction or discussion topic a user provides for the GPT AI model to respond to.

The prompt can be a question, statement, or any other stimulus intended to spark creativity, reflection, or engagement.

You can use the prompt to generate ideas, share thoughts, or start a conversation.

## Open AI DALL·E

Create realistic images and art from a description.

<figure><img src="/files/jxzTDAIhJKVzE8I3CM4Q" alt="" width="375"><figcaption><p>Open AI DALL·E </p></figcaption></figure>

### Parameters:

* **n:** number of images you want to generate. You can request 1-10 images at a time.
* **size:** image size. Smaller sizes are faster to generate.&#x20;
* **prompt:** a short description about the image you want to generate. The more detailed the description, the more likely you are to get the result that you want.

## Akool Faceswap

Swap faces between arbitrary faces for images. For example, a user can input his selfie `start-0`and swap the face on the figure image `res-ld-0.`

<figure><img src="/files/QZ1VNmzHp7JFDmMQAINp" alt=""><figcaption><p>Face Swap</p></figcaption></figure>

### Parameters:

* **Figure Image data:** A figure image for face swapping.
* **Face Image data:** A face image that you want to swap with the figure image.


---

# 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://botsquare.gitbook.io/botsquare/developer-guide/components/generative.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.
