obol-ai 0.2.21 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obol-ai",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"description": "Self-evolving AI assistant that learns, remembers, and acts on its own. Persistent vector memory, self-rewriting personality, proactive heartbeats.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/claude/chat.js
CHANGED
|
@@ -141,17 +141,19 @@ function createClaude(anthropicConfig, { personality, memory, userDir = OBOL_DIR
|
|
|
141
141
|
|
|
142
142
|
const runner = client.beta.messages.toolRunner({
|
|
143
143
|
model: activeModel,
|
|
144
|
-
max_tokens:
|
|
144
|
+
max_tokens: 128000,
|
|
145
145
|
system: systemPrompt,
|
|
146
146
|
messages: withCacheBreakpoints([...history]),
|
|
147
147
|
tools: runnableTools.length > 0 ? runnableTools : undefined,
|
|
148
148
|
max_iterations: getMaxToolIterations(),
|
|
149
|
+
stream: true,
|
|
149
150
|
}, { signal: abortController.signal });
|
|
150
151
|
|
|
151
152
|
let finalMessage;
|
|
152
|
-
for await (const
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
for await (const streamItem of runner) {
|
|
154
|
+
const msg = await streamItem.finalMessage();
|
|
155
|
+
finalMessage = msg;
|
|
156
|
+
trackUsage(msg.usage);
|
|
155
157
|
if (abortController.signal.aborted) break;
|
|
156
158
|
}
|
|
157
159
|
|
|
@@ -230,7 +230,7 @@ async function processTextMessage(ctx, fullMessage, { config, allowedUsers, bot,
|
|
|
230
230
|
stopTyping();
|
|
231
231
|
console.error('Message handling error:', e.message);
|
|
232
232
|
const errMsg = e.isOAuthExpiry
|
|
233
|
-
? `OAuth error: ${e.message}\n\nRun \`obol
|
|
233
|
+
? `OAuth error: ${e.message}\n\nRun \`obol reauth\` to re-authenticate.`
|
|
234
234
|
: (e.status === 401 || e.message?.includes('401'))
|
|
235
235
|
? 'API key invalid or expired. Run `obol config` to update.'
|
|
236
236
|
: (e.status === 429 || e.message?.includes('rate'))
|