Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.cudaSupport = true;
pkgs = import nixpkgs {
inherit system;
};
beamPackages = pkgs.beam.packages.erlang;
elixir = beamPackages.elixir;
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; ([
erlang_26
elixir_1_16
elixir
]);
};
}
Expand Down
4 changes: 3 additions & 1 deletion lib/stubidity/azure_openai/chat_completion.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule Stubidity.AzureOpenAI.ChatCompletion do
require Logger
import Plug.Conn

def init(_opts), do: nil
Expand Down Expand Up @@ -110,7 +111,8 @@ defmodule Stubidity.AzureOpenAI.ChatCompletion do
{:ok, conn} ->
{:cont, conn}

{:error, _reason, conn} ->
{:error, reason} ->
Logger.error("Error chunking response: #{inspect(reason)}")
{:halt, conn}
end
end)
Expand Down
4 changes: 3 additions & 1 deletion lib/stubidity/openai/chat_completion.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule Stubidity.OpenAI.ChatCompletion do
require Logger
import Plug.Conn
use OpenApiSpex.ControllerSpecs

Expand Down Expand Up @@ -136,7 +137,8 @@ defmodule Stubidity.OpenAI.ChatCompletion do
{:ok, conn} ->
{:cont, conn}

{:error, _reason, conn} ->
{:error, reason} ->
Logger.error("Error chunking response: #{inspect(reason)}")
{:halt, conn}
end
end)
Expand Down
4 changes: 3 additions & 1 deletion lib/stubidity/openai/completion.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule Stubidity.OpenAI.Completion do
require Logger
import Plug.Conn
use OpenApiSpex.ControllerSpecs

Expand Down Expand Up @@ -123,7 +124,8 @@ defmodule Stubidity.OpenAI.Completion do
{:ok, conn} ->
{:cont, conn}

{:error, _reason, conn} ->
{:error, reason} ->
Logger.error("Error chunking response: #{inspect(reason)}")
{:halt, conn}
end
end)
Expand Down
Loading