Exposes self-hosted n8n chat agents behind /v1/chat/completions and /v1/models. Model -> n8n webhook routing via a GenServer registry, so multiple agents map to multiple models. Plug + Bandit, req for the n8n webhook call, Bearer auth (ADAPTER_API_KEY). Ships a flake.nix (beamPackages.mixRelease) so it can be consumed as a NixOS flake input.
30 lines
510 B
Elixir
30 lines
510 B
Elixir
defmodule N8nOpenaiAdapter.MixProject do
|
|
use Mix.Project
|
|
|
|
def project do
|
|
[
|
|
app: :n8n_openai_adapter,
|
|
version: "0.1.0",
|
|
elixir: "~> 1.16",
|
|
start_permanent: Mix.env() == :prod,
|
|
deps: deps()
|
|
]
|
|
end
|
|
|
|
def application do
|
|
[
|
|
extra_applications: [:logger, :crypto],
|
|
mod: {N8nOpenaiAdapter.Application, []}
|
|
]
|
|
end
|
|
|
|
defp deps do
|
|
[
|
|
{:bandit, "~> 1.5"},
|
|
{:plug, "~> 1.16"},
|
|
{:jason, "~> 1.4"},
|
|
{:req, "~> 0.5"}
|
|
]
|
|
end
|
|
end
|