working on voice control
Some checks failed
CI/CD Pipeline / build (push) Failing after 4s

This commit is contained in:
2026-03-24 15:06:53 -06:00
parent f514012396
commit 86ff82a015
16 changed files with 704 additions and 173 deletions

View File

@@ -101,6 +101,17 @@ defmodule ElixirAi.Conversation do
end
end
def find_category(name) do
sql = "SELECT category FROM conversations WHERE name = $(name) LIMIT 1"
params = %{"name" => name}
case DbHelpers.run_sql(sql, params, "conversations") do
{:error, :db_error} -> {:error, :db_error}
[] -> {:error, :not_found}
[row | _] -> {:ok, row["category"] || "user-web"}
end
end
def find_allowed_tools(name) do
sql = "SELECT allowed_tools FROM conversations WHERE name = $(name) LIMIT 1"
params = %{"name" => name}