File tree Expand file tree Collapse file tree 2 files changed +49
-1
lines changed
Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ build = {
2525 modules = {
2626 [" openai" ] = " openai/init.lua" ,
2727 [" openai.chat_completions" ] = " openai/chat_completions.lua" ,
28- [" openai.responses" ] = " openai/responses.lua"
28+ [" openai.responses" ] = " openai/responses.lua" ,
29+ [" openai.compat.gemini" ] = " openai/compat/gemini.lua"
2930 }
3031}
Original file line number Diff line number Diff line change 1+ local OpenAI
2+ OpenAI = require (" openai" ).OpenAI
3+ local Gemini
4+ do
5+ local _class_0
6+ local _parent_0 = OpenAI
7+ local _base_0 = {
8+ api_base = " https://generativelanguage.googleapis.com/v1beta/openai" ,
9+ default_model = " gemini-2.5-flash"
10+ }
11+ _base_0 .__index = _base_0
12+ setmetatable (_base_0 , _parent_0 .__base )
13+ _class_0 = setmetatable ({
14+ __init = function (self , ...)
15+ return _class_0 .__parent .__init (self , ... )
16+ end ,
17+ __base = _base_0 ,
18+ __name = " Gemini" ,
19+ __parent = _parent_0
20+ }, {
21+ __index = function (cls , name )
22+ local val = rawget (_base_0 , name )
23+ if val == nil then
24+ local parent = rawget (cls , " __parent" )
25+ if parent then
26+ return parent [name ]
27+ end
28+ else
29+ return val
30+ end
31+ end ,
32+ __call = function (cls , ...)
33+ local _self_0 = setmetatable ({}, _base_0 )
34+ cls .__init (_self_0 , ... )
35+ return _self_0
36+ end
37+ })
38+ _base_0 .__class = _class_0
39+ if _parent_0 .__inherited then
40+ _parent_0 .__inherited (_parent_0 , _class_0 )
41+ end
42+ Gemini = _class_0
43+ end
44+ return {
45+ Gemini = Gemini ,
46+ new = Gemini
47+ }
You can’t perform that action at this time.
0 commit comments