Skip to content

Commit 442dc9a

Browse files
committed
Switching to OpenRouter.
1 parent 8964cb8 commit 442dc9a

39 files changed

+247
-691
lines changed

Project.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "EasyContext"
22
uuid = "5067fbba-b9ec-41e5-aa31-a8c1ac509a30"
3-
authors = ["SixZero <[email protected]>"]
43
version = "0.6.1"
4+
authors = ["SixZero <[email protected]>"]
55

66
[deps]
77
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
@@ -22,6 +22,7 @@ LLMRateLimiters = "ed1ca689-44f5-49fd-ae5c-d523230a773a"
2222
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
2323
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2424
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
25+
OpenRouter = "b1229eab-bc7b-489c-92b5-04baf87d8d0b"
2526
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
2627
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2728
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
@@ -34,7 +35,6 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3435
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
3536
Snowball = "fb8f903a-0164-4e73-9ffe-431110250c3b"
3637
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
37-
StreamCallbacksExt = "318dcf79-f1de-4874-b31b-6e12fc76f75a"
3838
ULID = "28ea79d9-6354-52a7-8af1-38e01db141d4"
3939
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
4040

@@ -66,7 +66,6 @@ SparseArrays = "≥1.9"
6666
LLMRateLimiters = "≥1.1.0"
6767
Crayons = "≥4.1"
6868
ProgressMeter = "≥1.10"
69-
StreamCallbacksExt = "≥0.4.5"
7069
Dates = "≥1.11"
7170
ULID = "≥0.3"
7271
JLD2 = "≥0.5"

archived/automation/condition_llm.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using PromptingTools
21

32
"""
43
condition_llm(condition::AbstractString; model::AbstractString="gpt4om", verbose::Bool=false)

archived/automation/selector_llm.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using PromptingTools
21

32
export selector_llm
43

examples/fluid_agent_usage.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using EasyContext
2-
using PromptingTools
32

43
"""
54
This example demonstrates various ways to use FluidAgent for automation tasks.

examples/julia_search_usage.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using EasyContext
22
using EasyContext: push_message!, BM25Embedder, TopK, julia_ctx_2_string, get_source
3-
using PromptingTools
43

54
"""
65
This example demonstrates how to use JuliaSearchTool and JuliaCTX for searching Julia code.

src/EasyContext.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ using LLMRateLimiters: TokenEstimationMethod, airatelimited, RateLimiterRPM, Rat
77
using Dates
88
using UUIDs
99

10-
using PromptingTools
11-
using PromptingTools: UserMessage, AIMessage, SystemMessage
10+
using OpenRouter
11+
using OpenRouter: UserMessage, AIMessage, SystemMessage
1212

1313
export search
1414
export EFFICIENT_PIPELINE, HIGH_ACCURACY_PIPELINE

src/Rephrase.v1.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
using RAGTools: AbstractRephraser
33
import RAGTools: rephrase
4-
using PromptingTools
54

65
Base.@kwdef struct JuliacodeRephraser <: AbstractRephraser
76
template::Symbol=:RAGRephraserByKeywords
@@ -16,7 +15,7 @@ function rephrase(rephraser::JuliacodeRephraser, question::AbstractString;
1615
placeholders = only(aitemplates(template)).variables # only one template should be found
1716
@assert (:query in placeholders) "Provided RAG Template $(template) is not suitable. It must have a placeholder: `query`."
1817

19-
msg = aigenerate(template; query = question, verbose, model, kwargs...)
18+
msg = aigen(template, model; query = question, verbose, kwargs...)
2019
Threads.atomic_add!(cost_tracker, msg.cost)
2120
useful_doc_ideas, possible_files_to_edit = parse_and_evaluate_script(msg.content)
2221
@show length.((useful_doc_ideas, possible_files_to_edit))

src/agents/FluidAgent.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UUIDs
2-
using PromptingTools
3-
using PromptingTools: aigenerate
4-
using StreamCallbacksExt: needs_tool_execution
2+
import PromptingTools: aigenerate
3+
using OpenRouter: needs_tool_execution
54

65
export FluidAgent, execute_tools, work, create_FluidAgent
76

src/chunkers/FullFileChunker.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using PromptingTools: recursive_splitter
1+
import PromptingTools: recursive_splitter
22
using RAGTools
33
using RAGTools: AbstractChunker
44

src/chunkers/NewlineChunker.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using FilePathsBase
2-
using PromptingTools: recursive_splitter
2+
import PromptingTools: recursive_splitter
33
using RAGTools
44
using RAGTools: AbstractChunker
55
using PyCall

0 commit comments

Comments
 (0)