fix(client/requestModel): model validation and streaming request (#610)

This commit is contained in:
Solareon
2024-07-01 21:18:51 +10:00
committed by GitHub
parent abad423aff
commit e12a7fd273
+2 -2
View File
@@ -6,11 +6,11 @@ function lib.requestModel(model, timeout)
if type(model) ~= 'number' then model = joaat(model) end
if HasModelLoaded(model) then return model end
if not IsModelValid(model) then
if not IsModelValid(model) and not IsModelInCdimage(model) then
error(("attempted to load invalid model '%s'"):format(model))
end
return lib.streamingRequest(IsModelInCdimage, HasModelLoaded, 'model', model, timeout)
return lib.streamingRequest(RequestModel, HasModelLoaded, 'model', model, timeout)
end
return lib.requestModel