initialize
This commit is contained in:
18
src/test.luau
Normal file
18
src/test.luau
Normal 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.')
|
||||
Reference in New Issue
Block a user