Skip to content

Commit 549ecf3

Browse files
committed
Host header is not in specs
Ref: - https://platform.openai.com/docs/api-reference/making-requests Instead, we should implement the ability to include arbitrary headers
1 parent 98c244e commit 549ecf3

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

openai/init.moon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ unpack = table.unpack or unpack
77

88
import types from require "tableshape"
99

10-
parse_url = require("socket.url").parse
11-
1210
empty = (types.nil + types.literal(cjson.null))\describe "nullable"
1311

1412
content_format = types.string + types.array_of types.one_of {
@@ -366,7 +364,6 @@ class OpenAI
366364
cjson.encode payload
367365

368366
headers = {
369-
"Host": parse_url(@api_base).host
370367
"Accept": "application/json"
371368
"Content-Type": "application/json"
372369
"Content-Length": body and #body or nil

0 commit comments

Comments
 (0)