refactoring folders
Some checks failed
CI/CD Pipeline / build (push) Failing after 8s

This commit is contained in:
2026-03-25 12:05:56 -06:00
parent d857e91241
commit 0041c25f19
32 changed files with 139 additions and 78 deletions

View File

@@ -0,0 +1,67 @@
defmodule ElixirAi.ToolTesting do
use GenServer
def hold_thing(thing) do
GenServer.cast(__MODULE__, {:hold_thing, thing})
end
def hold_thing_params do
%{
"type" => "object",
"properties" => %{
"name" => %{"type" => "string"},
"value" => %{"type" => "string"}
},
"required" => ["name", "value"]
}
end
def get_thing(_) do
GenServer.call(__MODULE__, :get_thing)
end
def get_thing_params do
%{
"type" => "object",
"properties" => %{},
"required" => []
}
end
def store_thing_params do
%{
"type" => "object",
"properties" => %{
"name" => %{"type" => "string"},
"value" => %{"type" => "string"}
},
"required" => ["name", "value"]
}
end
def read_thing_definition(name) do
%{
"type" => "function",
"function" => %{
"name" => name,
"description" => "read key value pair that was previously stored with store_thing"
}
}
end
def start_link(_) do
GenServer.start_link(__MODULE__, %{}, name: __MODULE__)
end
def init(args) do
{:ok, args}
end
def handle_cast({:hold_thing, thing}, _state) do
{:noreply, thing}
end
def handle_call(:get_thing, _from, state) do
{:reply, state, state}
end
end