Describe the bug
It appears that using the chat_gpt
interface isn't working.
For example, take this script:
(async () => {
let chatgpt_response = await chat_gpt({
message: "What is the capital of France?",
});
returnToBTT(chatgpt_response);
})();
I can see in Proxyman that the request payload is missing the user message:
{
"model": "gpt-4o-mini",
"messages": [
{
"content": "You are a helpful assistant who interprets every input as raw text unless instructed otherwise. Your answers do not include a description unless prompted to do so.",
"role": "system"
},
{
"content": [
{
"type": "text",
"text": ""
}
],
"role": "user"
}
]
}
Here's the response:
{
"id": "chatcmpl-B7hznFVRjShLD5us0f1flF8Y8eyLL",
"object": "chat.completion",
"created": 1741177115,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "It seems your message is empty. How can I assist you today?",
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 41,
"completion_tokens": 15,
"total_tokens": 56,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
"system_fingerprint": "fp_06737a9306"
}
Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Screenshots
If applicable, add screenshots to help explain your problem. (You can just paste or drag them here)
Device information:
- Type of Mac: MacBook Pro M1 2021
- macOS version: 15.3.1 (24D70)
- BetterTouchTool version: 5.252
Additional information (e.g. crash logs, related issues, etc.):