@tiens.nguyen/gonext-local-worker 1.0.76 → 1.0.77
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/gonext_agent_chat.py +8 -4
- package/package.json +1 -1
package/gonext_agent_chat.py
CHANGED
|
@@ -272,9 +272,13 @@ def run_agent_chat(cfg):
|
|
|
272
272
|
"It returns a STRING with the HTTP status and body. "
|
|
273
273
|
"Call it, then immediately call `final_answer(response)` inside the same code block.\n"
|
|
274
274
|
"IMPORTANT RULES:\n"
|
|
275
|
-
"-
|
|
276
|
-
"-
|
|
277
|
-
"
|
|
275
|
+
"- `headers` must be a JSON string, e.g. headers='{\"Content-Type\": \"application/json\"}'\n"
|
|
276
|
+
"- For Basic Auth: import base64; "
|
|
277
|
+
"creds = base64.b64encode(b'user:password').decode(); "
|
|
278
|
+
"headers = '{\"Authorization\": \"Basic ' + creds + '\"}'\n"
|
|
279
|
+
"- For Bearer token: headers='{\"Authorization\": \"Bearer YOUR_TOKEN\"}'\n"
|
|
280
|
+
"- Python's `datetime` and `base64` modules are available.\n"
|
|
281
|
+
"- If http_request returns an error starting with 'Error:', do NOT retry the same URL. Try a different one.\n"
|
|
278
282
|
"- Do NOT put final_answer outside the code block.\n\n"
|
|
279
283
|
)
|
|
280
284
|
task_with_hint = tool_hint + "Task: " + task_text
|
|
@@ -363,7 +367,7 @@ def run_agent_chat(cfg):
|
|
|
363
367
|
max_steps=max_steps,
|
|
364
368
|
step_callbacks=[step_callback],
|
|
365
369
|
executor_kwargs={"timeout_seconds": 60},
|
|
366
|
-
additional_authorized_imports=["json", "urllib", "urllib.request", "urllib.error"],
|
|
370
|
+
additional_authorized_imports=["json", "base64", "urllib", "urllib.request", "urllib.error"],
|
|
367
371
|
)
|
|
368
372
|
with contextlib.redirect_stdout(sys.stderr):
|
|
369
373
|
result = agent.run(task_with_hint)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiens.nguyen/gonext-local-worker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
4
4
|
"description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|