19 lines
462 B
Lua
19 lines
462 B
Lua
local stdio = require("@lune/stdio")
|
|
local xai = require('../src')
|
|
|
|
local apiKey: string = stdio.prompt("text", "Please provide the API key for testing")
|
|
|
|
local response = xai.responses(apiKey, {
|
|
model = 'grok-4-fast-non-reasoning',
|
|
messages = {
|
|
{
|
|
role = 'user',
|
|
content = 'Please reply with just "Working."'
|
|
}
|
|
},
|
|
stream = false
|
|
})
|
|
|
|
print(response)
|
|
print(response.choices[1].message.content == 'Working.')
|