Skip to content

Commit

Permalink
fix streaming api
Browse files Browse the repository at this point in the history
troubleshoot and fix publishing to websockets
  • Loading branch information
michaeljguarino committed Nov 20, 2024
1 parent 8bdf9fc commit 982115e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/console/ai/provider/openai.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule Console.AI.OpenAI do
access_key: opts.access_token,
model: opts.model,
base_url: opts.base_url,
stream: Stream.stream()
stream: Stream.stream() |> IO.inspect()
}
end

Expand Down
2 changes: 1 addition & 1 deletion lib/console/ai/stream/exec.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Console.AI.Stream.Exec do
%AIStream.SSE.Event{data: data}, acc ->
case reducer.(data) do
c when is_binary(c) ->
AIStream.publish(stream, c)
AIStream.publish(stream, c) |> IO.inspect()
{:cont, [c | acc]}
_ -> {:cont, acc}
end
Expand Down

0 comments on commit 982115e

Please sign in to comment.