Skip to content

Commit

Permalink
prompt test
Browse files Browse the repository at this point in the history
  • Loading branch information
jessedrelick committed Aug 21, 2024
1 parent 23008d5 commit 397aeec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ defmodule Agens.MixProject do
[
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:bumblebee, "~> 0.5.3"},
{:nx, "~> 0.7.3"},
{:exla, "~> 0.7.0"},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.17.1", only: :test}
Expand Down
8 changes: 5 additions & 3 deletions test/agens/job_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule Agens.JobTest do
import ExUnit.CaptureLog

alias Agens.{Agent, Job}
alias Test.Support.Tools.NoopTool

@lm_result_timeout 100_000

Expand Down Expand Up @@ -253,7 +254,7 @@ defmodule Agens.JobTest do
describe "prompt" do
setup [:start_agens, :start_serving]

@tag :skip
@tag capture_log: true
test "full prompt" do
job_name = :test_prompt_job
agent_name = :test_prompt_agent
Expand All @@ -264,6 +265,7 @@ defmodule Agens.JobTest do
constraints: "test agent constraints",
context: "test agent context",
reflection: "test agent reflection"
# TODO
# examples: [
# %{input: "A", output: "C"},
# %{input: "F", output: "H"},
Expand Down Expand Up @@ -298,8 +300,8 @@ defmodule Agens.JobTest do

assert_receive {:job_started, ^job_name}

assert_receive {:step_started, {^job_name, 0}, "test input"}
assert_receive {:tool_started, {^job_name, 0}, "STUB RUN"}
assert_receive {:step_started, {^job_name, 0}, ^input}
assert_receive {:tool_started, {^job_name, 0}, "sent 'test input' to: test_prompt_agent"}
assert_receive {:tool_raw, {^job_name, 0}, %{}}
assert_receive {:tool_result, {^job_name, 0}, "TRUE"}
assert_receive {:step_result, {^job_name, 0}, "TRUE"}
Expand Down

0 comments on commit 397aeec

Please sign in to comment.