Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

issue_understanding

notebooks/issue_understanding.livemd

issue_understanding

Application.fetch_env!(:fastrepl, :proxy_api_key)
Application.fetch_env!(:fastrepl, :proxy_api_base)

Section

defmodule Notebook do
  def render(repo_full_name, issue_number) do
    IO.puts("-- render --")

    issue =
      Fastrepl.Github.Issue.from!(repo_full_name, issue_number)
      |> Fastrepl.Renderer.Github.render_issue()

    issue |> Kino.Text.new() |> Kino.render()
    issue
  end

  def understand(rendered) do
    IO.puts("-- understand --")
    {:ok, ret} = Fastrepl.SemanticFunction.IssueUnderstanding.run(rendered)
    IO.inspect(ret)
    ret.summary |> Kino.Text.new() |> Kino.render()
  end
end
Notebook.render("BerriAI/litellm", "3673") |> Notebook.understand()
:ok
Notebook.render("BerriAI/litellm", "3646") |> Notebook.understand()
:ok

idd