Hugginface API returns 503
#65
by
Stoppedwumm
- opened
I have been making a Roblox game (yes very funny) and I've received a 503.
This is my code:
local http = game:GetService("HttpService")
local key = "token"
local endpoint = "https://api-inference.huggingface.co/models/microsoft/Phi-3-mini-128k-instruct"
local headers = {["Authorization"] = "Bearer " .. key}
local function query(input: string)
return http:JSONDecode(http:PostAsync(endpoint, input, Enum.HttpContentType.TextPlain, false, headers))
end
print(query("How are you?"))
The false argument in
return http:JSONDecode(http:PostAsync(endpoint, input, Enum.HttpContentType.TextPlain, false, headers))
means that it shouldn't compress the payload
nguyenbh
changed discussion status to
closed