Current section

9 Versions

Jump to

Compare versions

8 files changed
+122 additions
-39 deletions
  @@ -1,5 +1,5 @@
1 1 name = "llmgleam"
2 - version = "0.0.5"
2 + version = "0.0.6"
3 3
4 4 description = "Gleam bindings for various LLMs"
5 5 licences = ["MIT"]
  @@ -1,6 +1,6 @@
1 1 {<<"name">>, <<"llmgleam">>}.
2 2 {<<"app">>, <<"llmgleam">>}.
3 - {<<"version">>, <<"0.0.5">>}.
3 + {<<"version">>, <<"0.0.6">>}.
4 4 {<<"description">>, <<"Gleam bindings for various LLMs"/utf8>>}.
5 5 {<<"licenses">>, [<<"MIT">>]}.
6 6 {<<"build_tools">>, [<<"gleam">>]}.
  @@ -8,21 +8,16 @@
8 8 {<<"Repository">>, <<"https://github.com/Endi1/llmgleam">>}
9 9 ]}.
10 10 {<<"requirements">>, [
11 - {<<"gleam_json">>, [
12 - {<<"app">>, <<"gleam_json">>},
11 + {<<"gleam_http">>, [
12 + {<<"app">>, <<"gleam_http">>},
13 13 {<<"optional">>, false},
14 - {<<"requirement">>, <<">= 3.0.2 and < 4.0.0">>}
14 + {<<"requirement">>, <<">= 4.1.1 and < 5.0.0">>}
15 15 ]},
16 16 {<<"gleam_stdlib">>, [
17 17 {<<"app">>, <<"gleam_stdlib">>},
18 18 {<<"optional">>, false},
19 19 {<<"requirement">>, <<">= 0.44.0 and < 2.0.0">>}
20 20 ]},
21 - {<<"gleam_http">>, [
22 - {<<"app">>, <<"gleam_http">>},
23 - {<<"optional">>, false},
24 - {<<"requirement">>, <<">= 4.1.1 and < 5.0.0">>}
25 - ]},
26 21 {<<"envoy">>, [
27 22 {<<"app">>, <<"envoy">>},
28 23 {<<"optional">>, false},
  @@ -32,6 +27,11 @@
32 27 {<<"app">>, <<"gleam_hackney">>},
33 28 {<<"optional">>, false},
34 29 {<<"requirement">>, <<">= 1.3.2 and < 2.0.0">>}
30 + ]},
31 + {<<"gleam_json">>, [
32 + {<<"app">>, <<"gleam_json">>},
33 + {<<"optional">>, false},
34 + {<<"requirement">>, <<">= 3.0.2 and < 4.0.0">>}
35 35 ]}
36 36 ]}.
37 37 {<<"files">>, [
  @@ -39,6 +39,7 @@
39 39 <<"gleam.toml">>,
40 40 <<"include/llmgleam@client_GPTClient.hrl">>,
41 41 <<"include/llmgleam@client_GeminiClient.hrl">>,
42 + <<"include/llmgleam@client_Request.hrl">>,
42 43 <<"include/llmgleam@gemini_GeminiClientInternal.hrl">>,
43 44 <<"include/llmgleam@gpt_ChatCompletion.hrl">>,
44 45 <<"include/llmgleam@gpt_ChatCompletionRequest.hrl">>,
  @@ -0,0 +1,5 @@
1 + -record(request, {
2 + messages :: list(llmgleam@types:chat_message()),
3 + client :: llmgleam@client:client(),
4 + system_instruction :: gleam@option:option(binary())
5 + }).
  @@ -1,5 +1,5 @@
1 1 {application, llmgleam, [
2 - {vsn, "0.0.5"},
2 + {vsn, "0.0.6"},
3 3 {applications, [envoy,
4 4 gleam_hackney,
5 5 gleam_http,
  @@ -1,20 +1,9 @@
1 1 -module(llmgleam).
2 2 -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
3 3 -define(FILEPATH, "src/llmgleam.gleam").
4 - -export([new_client/2, completion/4]).
4 + -export([new_client/2]).
5 5
6 6 -file("src/llmgleam.gleam", 5).
7 7 -spec new_client(llmgleam@client:provider(), binary()) -> llmgleam@client:client().
8 8 new_client(Provider, Api_key) ->
9 9 llmgleam@client:new_client(Provider, Api_key).
10 -
11 - -file("src/llmgleam.gleam", 9).
12 - -spec completion(
13 - llmgleam@client:client(),
14 - binary(),
15 - list(llmgleam@types:chat_message()),
16 - gleam@option:option(binary())
17 - ) -> {ok, llmgleam@types:completion()} |
18 - {error, llmgleam@types:completion_error()}.
19 - completion(Client, Model, Messages, System_instruction) ->
20 - llmgleam@client:completion(Client, Model, Messages, System_instruction).
Loading more files…