Skip to content

Commit

Permalink
Enable ollama tests
Browse files Browse the repository at this point in the history
Enable ollama tests
  • Loading branch information
svilupp authored Dec 20, 2023
2 parents 9ce1084 + 5822069 commit dddb14c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/llm_ollama_managed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ end
@test msg.content == prompt
@test msg.status == 200
@test msg.tokens == (2, 1)
@test isapprox(msg.elapsed, 0, atol = 1e-2)
@test isapprox(msg.elapsed, 0, atol = 3e-1)
@test schema.inputs == (; system, prompt)
@test schema.model_id == "llama2"
end
Expand All @@ -105,7 +105,7 @@ end
@test msg.content == "Hello John"
@test msg.status == 200
@test msg.tokens == (2, 1)
@test isapprox(msg.elapsed, 0, atol = 1e-2)
@test isapprox(msg.elapsed, 0, atol = 3e-1)
@test schema.inputs ==
(; system = "Act as a helpful AI assistant", prompt = "Hello John")
@test schema.model_id == "llama2aaaa"
Expand Down Expand Up @@ -133,7 +133,7 @@ end
@test msg.content == ones(16)
@test msg.status == 200
@test msg.tokens == (0, 0)
@test isapprox(msg.elapsed, 0, atol = 1e-2)
@test isapprox(msg.elapsed, 0, atol = 3e-1)
@test schema.inputs == (; system = nothing, prompt = doc)
@test schema.model_id == "llama2"
end
Expand All @@ -146,7 +146,7 @@ end
@test msg.content == 2 * ones(16, 2)
@test msg.status == 200
@test msg.tokens == (0, 0)
@test isapprox(msg.elapsed, 0, atol = 1e-2)
@test isapprox(msg.elapsed, 0, atol = 3e-1)
@test schema.inputs == (; system = nothing, prompt = docs[2]) # only the last doc is caught (serial execution)
@test schema.model_id == "llama2"
end
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ end
include("llm_interface.jl")
include("llm_shared.jl")
include("llm_openai.jl")
include("llm_ollama_managed.jl")
include("templates.jl")
include("serialization.jl")
include("code_generation.jl")
Expand Down

0 comments on commit dddb14c

Please sign in to comment.