Current section
Files
Jump to
Current section
Files
src/staff_ai@agent.erl
-module(staff_ai@agent).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([create/3]).
-export_type([agent/0]).
-type agent() :: {agent,
binary(),
binary(),
binary(),
gleam@option:option(binary())}.
-spec create(binary(), binary(), gleam@option:option(binary())) -> agent().
create(Name, Role, Context) ->
_assert_subject = ids@uuid:generate_v4(),
{ok, Id} = case _assert_subject of
{ok, _} -> _assert_subject;
_assert_fail ->
erlang:error(#{gleam_error => let_assert,
message => <<"Assertion pattern match failed"/utf8>>,
value => _assert_fail,
module => <<"staff_ai/agent"/utf8>>,
function => <<"create"/utf8>>,
line => 35})
end,
{agent, Id, Name, Role, Context}.