local 状态,时间信息 = POST("http://vv.video.qq.com/checktime","otype=json")
if (状态 == 200) then
local 时间戳 = tonumber(string.match(时间信息,'"t":(%d+)'));
调试输出("时间戳",时间戳,os.date("%Y-%m-%d %H:%M:%S",时间戳))
end
local 存档信息 = {
名称 = "小明",
等级 = 20,
金币 = 9887
}
local 状态,结果 = POST("http://xxxxxxx/call",存档信息,true)
调试输出(状态,结果)
local 关键词 = "Chinese-style realistic wolf monster with transparent background for game use";
math.randomseed(os.time())
local seed = math.random(99999)
local 状态,结果 = POST("https://image.pollinations.ai/prompt/"..关键词.."?model=turbo&width=256&height=256&nologo=true&seed=" .. seed)
调试输出(状态,结果,seed)
if (状态 == 200) then
按钮对象.父窗口.图片框3.底图 = 结果
end
local headers = {}
headers["Authorization"] = "Bearer xxxxxxxxxxxxxxxxxx"
headers["Content-Type"] = "application/json"
local 接口信息 = {
model = "Qwen/Qwen3-Next-80B-A3B-Instruct",
messages = {{role="user",content="写一个Lua加法函数"}},
top_p = 0.7,
thinking_budget = 4096
}
local 状态,结果 = POST("https://api.siliconflow.cn/v1/chat/completions",接口信息,true,headers)
调试输出(状态,结果)
local 文生图接口 = {
batch_size = 3,
num_inference_steps = 20,
guidance_scale = 7.5,
prompt = "半兽人战士,全身像,肌肉发达,绿色皮肤,獠牙外露,手持粗糙石斧,穿着兽皮裙和骨制护甲,眼神凶狠,写实质感",
model = "Kwai-Kolors/Kolors",
image_size = "1024x1024",
}
local 状态,结果 = POST("https://api.siliconflow.cn/v1/images/generations",文生图接口,true,headers)
if(状态 == 200) then
local jsonTbl = table.loadjson(结果)
调试输出(jsonTbl)
end