diff --git a/Project.toml b/Project.toml index d9b150e41..b0192db4d 100644 --- a/Project.toml +++ b/Project.toml @@ -7,7 +7,6 @@ version = "0.66.0" AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" -FlashRank = "22cc3f58-1757-4700-bb45-2032706e5a8d" HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -17,9 +16,7 @@ PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Preferences = "21216c6a-2e73-6563-6e65-726566657250" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -Snowball = "fb8f903a-0164-4e73-9ffe-431110250c3b" StreamCallbacks = "c1b9e933-98a0-46fc-8ea7-3b58b195fb0a" -StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [weakdeps] @@ -56,13 +53,10 @@ PrecompileTools = "1" Preferences = "1" REPL = "<0.0.1, 1" Random = "<0.0.1, 1" -Snowball = "0.1" SparseArrays = "<0.0.1, 1" Statistics = "<0.0.1, 1" StreamCallbacks = "0.4, 0.5" -StructTypes = "1" Test = "<0.0.1, 1" -Unicode = "<0.0.1, 1" julia = "1.9, 1.10" [extras] diff --git a/src/messages.jl b/src/messages.jl index 50c0ec8d0..98e0757c2 100644 --- a/src/messages.jl +++ b/src/messages.jl @@ -262,7 +262,7 @@ for automatic operations. """ Base.@kwdef struct AnnotationMessage{T <: AbstractString} <: AbstractAnnotationMessage content::T - extras::Dict{Symbol, Any} = Dict{Symbol, Any}() + extras::Dict{Symbol, <:Any} = Dict{Symbol, Any}() tags::Vector{Symbol} = Symbol[] comment::String = "" run_id::Union{Nothing, Int} = Int(rand(Int32)) diff --git a/src/precompilation.jl b/src/precompilation.jl index 4b9af809e..3dfe85339 100644 --- a/src/precompilation.jl +++ b/src/precompilation.jl @@ -1,13 +1,13 @@ # Basic Message Types precompilation - moved to top sys_msg = SystemMessage("You are a helpful assistant") user_msg = UserMessage("Hello!") -ai_msg = AIMessage(content="Test response") +ai_msg = AIMessage(content = "Test response") # Annotation Message precompilation - after basic types annotation_msg = AnnotationMessage("Test metadata"; - extras=Dict{Symbol,Any}(:key => "value"), - tags=Symbol[:test], - comment="Test comment") + extras = Dict{Symbol, Any}(:key => "value"), + tags = Symbol[:test], + comment = "Test comment") _ = isabstractannotationmessage(annotation_msg) # ConversationMemory precompilation @@ -27,6 +27,11 @@ messages = [ ] _ = render(OpenAISchema(), messages) +## Utilities +pprint(messages) +last_output(messages) +last_message(messages) + # Load templates load_template(joinpath(@__DIR__, "..", "templates", "general", "BlankSystemUser.json")) load_templates!()