@tiens.nguyen/gonext-local-worker 1.0.68 → 1.0.69

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.
@@ -244,16 +244,9 @@ def run_agent_chat(cfg):
244
244
  # and always terminate with final_answer() rather than looping forever.
245
245
  tool_hint = (
246
246
  "You have ONE built-in function: `http_request(method, url, headers='', body='')`. "
247
- "It returns a plain STRING NOT a dict. Never use response['key'] or response.get().\n"
248
- "The string is either 'HTTP <status>\\n<body>' on success, or 'Error: ...' on failure.\n"
249
- "Always check for errors first:\n"
250
- " import json\n"
251
- " if response.startswith('Error:'):\n"
252
- " final_answer(f'The request failed: {response}')\n"
253
- " else:\n"
254
- " lines = response.split('\\n', 1)\n"
255
- " data = json.loads(lines[1]) if len(lines) > 1 else {}\n"
256
- " final_answer(f'The API returned HTTP {lines[0].split()[1]}: {data}')\n\n"
247
+ "It returns a STRING with the HTTP status and body. "
248
+ "Call it, then immediately call `final_answer(response)` inside the same code block.\n"
249
+ "Do NOT put final_answer outside the code block.\n\n"
257
250
  )
258
251
  task_with_hint = tool_hint + "Task: " + task_text
259
252
 
@@ -277,7 +270,6 @@ def run_agent_chat(cfg):
277
270
  result = _http_request_impl(method, url, parsed_headers, body or None)
278
271
  if result.startswith("Error:"):
279
272
  _log(f"http_request retry {method.upper()} {url}")
280
- _emit({"type": "step", "text": f"HTTP {method.upper()} {url} → timeout, retrying…"})
281
273
  result = _http_request_impl(method, url, parsed_headers, body or None)
282
274
  status_line = result.split("\n")[0][:150] if result else "no response"
283
275
  _emit({"type": "step", "text": f"HTTP {method.upper()} {url} → {status_line}"})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gonext-local-worker",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
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",