File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313## [ 0.10.0]
1414
1515### Updated
16- - Increased compat for PromptingTools to v0.85
16+ - Moved up compat for PromptingTools to v0.87 (fixing api key bug for embedding models)
17+
18+ ### Fixed
19+ - Fixed mock embedding response in the tests
1720
1821## [ 0.9.0]
1922
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ HTTP = "1.10.15"
2929JSON3 = " 1.14.1"
3030LinearAlgebra = " 1"
3131ProgressMeter = " 1.10"
32- PromptingTools = " 0.84 - 0.85 "
32+ PromptingTools = " 0.87 "
3333Random = " 1"
3434Snowball = " 0.1"
3535SparseArrays = " 1"
Original file line number Diff line number Diff line change 6565 @test_throws AssertionError get_embeddings (BitPackedBatchEmbedder (), String[])
6666
6767 # corresponds to OpenAI API v1
68- response1 = Dict (:data => [Dict (:embedding => ones (128 , 2 ))],
68+ response1 = Dict (
69+ :data => [Dict (:embedding => ones (Float32, 128 )),
70+ Dict (:embedding => ones (Float32, 128 ))],
6971 :usage => Dict (:total_tokens => 2 , :prompt_tokens => 2 , :completion_tokens => 0 ))
7072 schema = TestEchoOpenAISchema (; response = response1, status = 200 )
7173 PT. register_model! (; name = " mock-emb" , schema)
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ using Aqua
99const PT = PromptingTools
1010const RT = RAGTools
1111
12+ # Set a dummy API key for tests using CustomOpenAISchema with mock HTTP servers
13+ # Required since OpenAI.jl now throws an error when api_key is empty
14+ # We set the PT global directly since it's loaded at module load time from preferences/ENV
15+ if isempty (PT. OPENAI_API_KEY)
16+ PT. OPENAI_API_KEY = " test-api-key-for-mock-server"
17+ end
18+
1219@testset " RAGTools.jl" begin
1320 @testset " Code quality (Aqua.jl)" begin
1421 Aqua. test_all (RAGTools)
You can’t perform that action at this time.
0 commit comments