Skip to content

Commit 3e9454e

Browse files
committed
make new_chat_session generic
1 parent 8491ad2 commit 3e9454e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

openai/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ do
1212
api_base = "https://api.openai.com/v1",
1313
default_model = "gpt-4.1",
1414
new_chat_session = function(self, ...)
15+
return self:new_chat_completions_session(...)
16+
end,
17+
new_chat_completions_session = function(self, ...)
1518
local ChatSession
1619
ChatSession = require("openai.chat_completions").ChatSession
1720
return ChatSession(self, ...)

openai/init.moon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class OpenAI
2424
@config[k] = v
2525

2626
new_chat_session: (...) =>
27+
@new_chat_completions_session ...
28+
29+
new_chat_completions_session: (...) =>
2730
import ChatSession from require "openai.chat_completions"
2831
ChatSession @, ...
2932

0 commit comments

Comments
 (0)