Skip to content

Commit 21ef8e8

Browse files
committed
Patch bug with julia client, allow for dev mode. Update version to 0.0.5.
1 parent 25ebdb7 commit 21ef8e8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

julia/Bytez/src/Bytez.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module Bytez
5555
function request(path::String, body::String = "")
5656
response = HTTP.request(
5757
body == "" ? "GET" : "POST",
58-
"https://api.bytez.com/$path",
58+
"$HOST/$path",
5959
status_exception = false,
6060
body = body,
6161
headers = Dict(
@@ -95,7 +95,7 @@ module Bytez
9595
status = ""
9696

9797
try
98-
json = request("model/start", body)
98+
json = start(body)
9999
catch
100100
json = request("model/status", body)
101101
finally
@@ -127,9 +127,17 @@ module Bytez
127127
#
128128
# bytez
129129
#
130-
function init(key::String)
130+
function init(key::String, dev::Bool = false)
131131
global API_KEY = key
132132

133+
global HOST
134+
135+
if dev
136+
HOST = "http://localhost:8080"
137+
else
138+
HOST = "https://bytez.com"
139+
end
140+
133141
function create_new_model(model_id::String; concurrency::Int = 1, timeout::Int = 300)
134142
return Model(model_id, concurrency, timeout)
135143
end

0 commit comments

Comments
 (0)