Skip to content

Commit 4e0115d

Browse files
committed
update examples
1 parent 99d9281 commit 4e0115d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/chat_completions/basic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
local openai = require("openai")
22
local client = openai.new(os.getenv("OPENAI_API_KEY"))
33

4-
local status, response = client:chat({
4+
local status, response = client:create_chat_completion({
55
{role = "system", content = "You are a Lua programmer"},
66
{role = "user", content = "Write a 'Hello world' program in Lua"}
77
}, {

examples/chat_completions/streaming.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
local openai = require("openai")
22
local client = openai.new(os.getenv("OPENAI_API_KEY"))
33

4-
client:chat({
4+
client:create_chat_completion({
55
{role = "system", content = "You work for Streak.Club, a website to track daily creative habits"},
66
{role = "user", content = "Who do you work for?"}
77
}, {

examples/chat_completions/vision.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
local openai = require("openai")
44
local client = openai.new(os.getenv("OPENAI_API_KEY"))
55

6-
local status, response = client:chat({
6+
local status, response = client:create_chat_completion({
77
{
88
role = "user",
99
content = {

0 commit comments

Comments
 (0)