Current section

9 Versions

Jump to

Compare versions

5 files changed
+19 additions
-22 deletions
  @@ -1,6 +1,5 @@
1 1 name = "llmgleam"
2 - version = "0.0.7"
3 -
2 + version = "0.0.8"
4 3 description = "Gleam bindings for various LLMs"
5 4 licences = ["MIT"]
6 5 repository = { type = "github", user = "Endi1", repo = "llmgleam" }
  @@ -1,6 +1,6 @@
1 1 {<<"name">>, <<"llmgleam"/utf8>>}.
2 2 {<<"app">>, <<"llmgleam"/utf8>>}.
3 - {<<"version">>, <<"0.0.7"/utf8>>}.
3 + {<<"version">>, <<"0.0.8"/utf8>>}.
4 4 {<<"description">>, <<"Gleam bindings for various LLMs"/utf8>>}.
5 5 {<<"licenses">>, [<<"MIT"/utf8>>]}.
6 6 {<<"build_tools">>, [<<"gleam"/utf8>>]}.
  @@ -8,6 +8,16 @@
8 8 {<<"Repository"/utf8>>, <<"https://github.com/Endi1/llmgleam"/utf8>>}
9 9 ]}.
10 10 {<<"requirements">>, [
11 + {<<"gleam_json"/utf8>>, [
12 + {<<"app">>, <<"gleam_json"/utf8>>},
13 + {<<"optional">>, false},
14 + {<<"requirement">>, <<">= 3.0.2 and < 4.0.0"/utf8>>}
15 + ]},
16 + {<<"gleam_stdlib"/utf8>>, [
17 + {<<"app">>, <<"gleam_stdlib"/utf8>>},
18 + {<<"optional">>, false},
19 + {<<"requirement">>, <<">= 0.44.0 and < 2.0.0"/utf8>>}
20 + ]},
11 21 {<<"gleam_hackney"/utf8>>, [
12 22 {<<"app">>, <<"gleam_hackney"/utf8>>},
13 23 {<<"optional">>, false},
  @@ -18,20 +28,10 @@
18 28 {<<"optional">>, false},
19 29 {<<"requirement">>, <<">= 4.1.1 and < 5.0.0"/utf8>>}
20 30 ]},
21 - {<<"gleam_json"/utf8>>, [
22 - {<<"app">>, <<"gleam_json"/utf8>>},
23 - {<<"optional">>, false},
24 - {<<"requirement">>, <<">= 3.0.2 and < 4.0.0"/utf8>>}
25 - ]},
26 31 {<<"envoy"/utf8>>, [
27 32 {<<"app">>, <<"envoy"/utf8>>},
28 33 {<<"optional">>, false},
29 34 {<<"requirement">>, <<">= 1.0.2 and < 2.0.0"/utf8>>}
30 - ]},
31 - {<<"gleam_stdlib"/utf8>>, [
32 - {<<"app">>, <<"gleam_stdlib"/utf8>>},
33 - {<<"optional">>, false},
34 - {<<"requirement">>, <<">= 0.44.0 and < 2.0.0"/utf8>>}
35 35 ]}
36 36 ]}.
37 37 {<<"files">>, [
  @@ -1,5 +1,5 @@
1 1 {application, llmgleam, [
2 - {vsn, "0.0.7"},
2 + {vsn, "0.0.8"},
3 3 {applications, [envoy,
4 4 gleam_hackney,
5 5 gleam_http,
  @@ -93,7 +93,7 @@ fn chat_message_decoder() -> decode.Decoder(option.Option(types.ChatMessage)) {
93 93 case role {
94 94 option.Some(r) ->
95 95 decode.success(option.Some(types.ChatMessage(role: r, content: text)))
96 - _ -> panic as "could not parse role"
96 + option.None -> decode.failure(option.None, "could not parse role")
97 97 }
98 98 }
99 99 _ -> {
  @@ -127,13 +127,11 @@ chat_message_decoder() ->
127 127 {some, {chat_message, Text, R}}
128 128 );
129 129
130 - _ ->
131 - erlang:error(#{gleam_error => panic,
132 - message => <<"could not parse role"/utf8>>,
133 - file => <<?FILEPATH/utf8>>,
134 - module => <<"llmgleam/gpt"/utf8>>,
135 - function => <<"chat_message_decoder"/utf8>>,
136 - line => 96})
130 + none ->
131 + gleam@dynamic@decode:failure(
132 + none,
133 + <<"could not parse role"/utf8>>
134 + )
137 135 end
138 136 end
139 137 )