open-agents-ai 0.185.82 → 0.185.83
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/dist/index.js +3 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67934,20 +67934,12 @@ async function handleRequest(req, res, ollamaUrl, verbose) {
|
|
|
67934
67934
|
addUserMessage(session, chatBody.message);
|
|
67935
67935
|
compactSession(session);
|
|
67936
67936
|
const historyLines = session.messages.filter((m) => m.role !== "system").slice(-10).map((m) => m.role === "user" ? `User: ${m.content}` : `Assistant: ${m.content}`).join("\n");
|
|
67937
|
-
const taskPrompt =
|
|
67938
|
-
Use your tools (web_search, web_fetch, file_read, shell, memory_read, etc.) when the user's request requires real data.
|
|
67939
|
-
If the user asks about current events, news, or real-time data \u2014 use web_search to find it.
|
|
67940
|
-
If the user asks about files or code \u2014 use file_read.
|
|
67941
|
-
If the user asks you to run something \u2014 use shell.
|
|
67942
|
-
NEVER say "I don't have browsing capabilities" \u2014 you DO have web_search and web_fetch.
|
|
67943
|
-
NEVER say "I'm just an AI" \u2014 you are Open Agent with full tool access.
|
|
67944
|
-
|
|
67945
|
-
` + (historyLines ? `Previous conversation:
|
|
67937
|
+
const taskPrompt = (historyLines ? `Previous conversation:
|
|
67946
67938
|
${historyLines}
|
|
67947
67939
|
|
|
67948
|
-
` : "") +
|
|
67940
|
+
` : "") + `${chatBody.message}
|
|
67949
67941
|
|
|
67950
|
-
Respond conversationally. Call task_complete with your response
|
|
67942
|
+
Respond conversationally. Call task_complete with your final response.`;
|
|
67951
67943
|
const oaBin = process.argv[1] || "oa";
|
|
67952
67944
|
const args = [taskPrompt, "--json", "--non-interactive"];
|
|
67953
67945
|
if (model)
|
package/package.json
CHANGED