Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
svilupp committed Nov 26, 2024
1 parent c533d67 commit d89c779
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 0 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/messages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
13 changes: 9 additions & 4 deletions src/precompilation.jl
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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!()
Expand Down

0 comments on commit d89c779

Please sign in to comment.