From abf539a68adf395472e3209b16b6877369ae55da Mon Sep 17 00:00:00 2001 From: J S <49557684+svilupp@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:27:42 +0100 Subject: [PATCH 1/3] add fix --- CHANGELOG.md | 8 ++++++++ Project.toml | 4 ++-- src/conversation.jl | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60a56a0..4628abe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +## [0.2.1] + +### Updated +- Increased compat bound for PromptingTools to 0.36-0.42 + +### Fixed +- Fixed a bug where serialized RAGResult without any sources wouldn't be rendered. + ## [0.2.0] ### Updated diff --git a/Project.toml b/Project.toml index 95131f5..5b4fbf5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Spehulak" uuid = "13b2040c-5979-4bcf-93a6-c2323bf411ba" authors = ["J S <49557684+svilupp@users.noreply.github.com> and contributors"] -version = "0.2.0" +version = "0.2.1" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" @@ -20,7 +20,7 @@ DataFrames = "1.4,1.5,1.6" Dates = "<0.0.1, 1" GenieFramework = "2.1" JSON3 = "1" -PromptingTools = "0.36" +PromptingTools = "0.36-0.42" Statistics = "<0.0.1, 1" StippleDownloads = "0.1" Test = "<0.0.1, 1" diff --git a/src/conversation.jl b/src/conversation.jl index 7cc4915..e152132 100644 --- a/src/conversation.jl +++ b/src/conversation.jl @@ -179,7 +179,7 @@ function msg2snow(rag::RT.RAGResult; path::AbstractString = "") end context = String[] for i in eachindex(rag.context) - source_str = if i > length(rag.sources) + source_str = if i <= length(rag.sources) "Source: $(rag.sources[i])\n" else "" From ef93825cad0b4ce85b9ee7a31f95690d6fae8990 Mon Sep 17 00:00:00 2001 From: J S <49557684+svilupp@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:30:38 +0100 Subject: [PATCH 2/3] up --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5b4fbf5..4031cea 100644 --- a/Project.toml +++ b/Project.toml @@ -20,7 +20,7 @@ DataFrames = "1.4,1.5,1.6" Dates = "<0.0.1, 1" GenieFramework = "2.1" JSON3 = "1" -PromptingTools = "0.36-0.42" +PromptingTools = "0.36 - 0.42" Statistics = "<0.0.1, 1" StippleDownloads = "0.1" Test = "<0.0.1, 1" From 47c553d2e2ced9bd855d5ba9d93eb12a9f65cfff Mon Sep 17 00:00:00 2001 From: J S <49557684+svilupp@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:38:36 +0100 Subject: [PATCH 3/3] fix test --- test/conversation.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/conversation.jl b/test/conversation.jl index 6d6e712..5981dc0 100644 --- a/test/conversation.jl +++ b/test/conversation.jl @@ -44,7 +44,8 @@ using Spehulak: msg2snow, SnowMessage, SnowConversation, SnowRAG ) snow_res = msg2snow(res; path = "d/e/f") @test snow_res.title == "d/e/f" - @test snow_res.context == ["Context ID 1\n-----\nContext:\n-----\nworld\n\n"] + @test snow_res.context == + ["Context ID 1\nSource: my\n-----\nContext:\n-----\nworld\n\n"] @test snow_res.sources == ["my"] @test snow_res.class == "" @test snow_res.conv_main isa SnowConversation