# callback\_CallGeneralAI

## Description

This async function is called when a general AI request is completed and some response is returned.

#### Syntax

```
callback_CallGeneralAI(callId,  succeeded, responseMessage, creditsUsed)
```

| Argument          | Description                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------ |
| `callId`          | <p>The id of this call request. It was returned in CallGeneralAI.<br>This is a number.</p> |
| `succeeded`       | Boolean that tells us if the request was successful or not.                                |
| `responseMessage` | <p>The reply from the GPT AI model.<br>This is a String.</p>                               |
| `creditsUsed`     | <p>The number of RNet AI credits this request used.<br>This is a number.</p>               |

#### Returns

```
N/A
```

## Example Implementation

```gml
function callback_CallGeneralAI(callId,  succeeded, responseMessage, creditsUsed){
	show_message("call id "+string(callId) +" was success? "+string(succeeded)+" "+ responseMessage)
}
```
