Skip to content

Commit 6bb9222

Browse files
committed
Merge github.com:ericdallo/eca
2 parents 614c207 + 70ba5ae commit 6bb9222

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- Get models and configs from models.dev instead of hardcoding in eca.
66
- Allow custom models addition via `models <modelName>` config.
77
- Add `/resume` command to resume previous chats.
8+
- Support loading system prompts from a file.
9+
- Fix model name parsing.
810

911
## 0.23.1
1012

@@ -163,7 +165,7 @@
163165

164166
## 0.10.2
165167

166-
- Fix usage metrics for anthropic models.
168+
- Fix usage metrics for anthropic models.
167169

168170
## 0.10.1
169171

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ interface Config {
195195
anthropicApiKey?: string;
196196
rules: [{path: string;}];
197197
commands: [{path: string;}];
198-
systemPromptTemplate?: string;
198+
systemPromptTemplateFile?: string;
199199
nativeTools: {
200200
filesystem: {enabled: boolean};
201201
shell: {enabled: boolean;

src/eca/features/prompt.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(def ^:private agent-behavior (memoize agent-behavior*))
2323

2424
(defn ^:private eca-prompt [behavior config]
25-
(let [prompt (or (:systemPromptTemplate config)
25+
(let [prompt (or (some-> (:systemPromptTemplateFile config) slurp)
2626
(base-prompt-template))]
2727
(reduce
2828
(fn [p [k v]]

src/eca/llm_api.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
callbacks)
162162

163163
(contains? custom-models model)
164-
(let [[provider model] (string/split model #"/")
164+
(let [[provider model] (string/split model #"/" 2)
165165
provider-config (get custom-providers (keyword provider))
166166
provider-fn (case (:api provider-config)
167167
"openai" llm-providers.openai/completion!

0 commit comments

Comments
 (0)