Skip to content

Commit

Permalink
lm test tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jessedrelick committed Aug 17, 2024
1 parent c9ce56c commit a4c3aeb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
4 changes: 1 addition & 3 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Config

config :agens,
registry: Agens.Registry,
real_llm: false
config :agens, registry: Agens.Registry
14 changes: 13 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ defmodule Agens.MixProject do
description:
"Create multi-agent workflows with AI and Language Models using OTP components for reliable and scalable automation.",
package: package(),
docs: docs()
docs: docs(),
aliases: aliases(),
preferred_cli_env: [
"test.all": :test,
"test.lm": :test
]
]
end

Expand Down Expand Up @@ -92,4 +97,11 @@ defmodule Agens.MixProject do

defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]

defp aliases do
[
"test.all": ["test --include lm"],
"test.lm": ["test --only lm"]
]
end
end
8 changes: 8 additions & 0 deletions test/agens/job_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,12 @@ defmodule Agens.JobTest do
assert_receive {:job_ended, ^name, :complete}
end
end

describe "lm" do

@tag :lm
test "run job" do
assert true
end
end
end
3 changes: 0 additions & 3 deletions test/support/serving.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ defmodule Test.Support.Serving do
{:reply, "STUB RUN", state}
end
end

def get(true), do: LLM.get()
def get(false), do: Stub.get()
end
6 changes: 2 additions & 4 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
real_llm? = Application.get_env(:agens, :real_llm, false)

Supervisor.start_link(
[
{Agens.Supervisor, name: Agens.Supervisor}
Expand All @@ -9,10 +7,10 @@ Supervisor.start_link(

%Agens.Serving.Config{
name: :text_generation,
serving: Test.Support.Serving.get(real_llm?)
serving: Test.Support.Serving.Stub
}
|> Agens.Serving.start()

:meck.new(Agent, [:passthrough])

ExUnit.start()
ExUnit.start(exclude: [:lm])

0 comments on commit a4c3aeb

Please sign in to comment.