initialize

This commit is contained in:
2025-09-23 21:25:35 -06:00
commit 5b82c5381e
6 changed files with 292 additions and 0 deletions

18
src/test.luau Normal file
View File

@@ -0,0 +1,18 @@
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.')