disable external connections while testing with mimix
Some checks failed
CI/CD Pipeline / build (push) Failing after 3s

This commit is contained in:
2026-03-13 15:21:06 -06:00
parent 59a8ad9635
commit 0fd243d259
13 changed files with 151 additions and 14 deletions

View File

@@ -36,7 +36,6 @@ defmodule ElixirAi.ChatUtils do
%{
name: name,
definition: schema,
# function: function,
run_function: run_function
}
end

View File

@@ -1,7 +1,7 @@
defmodule ElixirAi.ChatRunner do
require Logger
use GenServer
import ElixirAi.ChatUtils
import ElixirAi.ChatUtils, only: [ai_tool: 1]
alias ElixirAi.{Conversation, Message}
defp via(name), do: {:via, Horde.Registry, {ElixirAi.ChatRegistry, name}}
@@ -39,7 +39,7 @@ defmodule ElixirAi.ChatRunner do
"Last message role was #{last_message.role}, requesting AI response for conversation #{name}"
)
request_ai_response(self(), messages, tools(self(), name))
ElixirAi.ChatUtils.request_ai_response(self(), messages, tools(self(), name))
end
{:ok,
@@ -103,7 +103,7 @@ defmodule ElixirAi.ChatRunner do
store_message(state.name, new_message)
new_state = %{state | messages: state.messages ++ [new_message]}
request_ai_response(self(), new_state.messages, state.tools)
ElixirAi.ChatUtils.request_ai_response(self(), new_state.messages, state.tools)
{:noreply, new_state}
end
@@ -283,7 +283,7 @@ defmodule ElixirAi.ChatRunner do
if new_pending_tool_calls == [] do
broadcast_ui(state.name, :tool_calls_finished)
request_ai_response(self(), state.messages ++ [new_message], state.tools)
ElixirAi.ChatUtils.request_ai_response(self(), state.messages ++ [new_message], state.tools)
end
{:noreply,

View File

@@ -83,3 +83,9 @@ defmodule ElixirAi.Data.DbHelpers do
{positional_sql, ordered_values}
end
end
defmodule ElixirAi.Repo do
use Ecto.Repo,
otp_app: :elixir_ai,
adapter: Ecto.Adapters.Postgres
end

View File

@@ -1,5 +0,0 @@
defmodule ElixirAi.Repo do
use Ecto.Repo,
otp_app: :elixir_ai,
adapter: Ecto.Adapters.Postgres
end