-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathantigravity-api.lua.cfg
More file actions
48 lines (42 loc) · 1.52 KB
/
antigravity-api.lua.cfg
File metadata and controls
48 lines (42 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name = "Antigravity API"
local U = ...
if not U.restapi then return end
local Antigravity = U.restapi.GoogleInternal:class("Antigravity", {
client_id="1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
client_secret="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",
--headers={ ["User-Agent"]="antigravity/1.14.2 windows/amd64" }, --https://antigravity.google/changelog
headers={ ["User-Agent"]="antigravity" },
})
local applyParams = _import("Gemini.lua.cfg", Antigravity)
if not applyParams then return end
url = "https://antigravity.google/"
predefined.api_base = {
"",
"https://daily-cloudcode-pa.sandbox.googleapis.com/v1internal",
"https://autopush-cloudcode-pa.sandbox.googleapis.com/v1internal",
--"https://cloudcode-pa.googleapis.com/v1internal",
}
predefined.api_key = nil
predefined.model = "gemini-3-flash"
return applyParams,
--https://antigravity.google/docs/models
--https://antigravity.google/docs/plans -- rate limits
function (data) -- getModels
local client = Antigravity(data.apikey, data.api_base)
local models = assert(client:models())
models.filterFn = function(model)
return model.recommended
end
models.keyId = "name"
return models
end,
function () --authFn
local _export = {json=U.json, openUrl=U.utils.openUrl}
local oauth = U.utils.loadMoon("oauth_google.moon.1", _export) "oauth_google"
local title,msg = "Authorization",nil
return oauth("antigravity", function(line)
msg = msg and msg.."\n" or ""
msg = msg..line
far.Message(msg,title,"","l")
end)
end