Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lisette/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def _trunc_str(s, mx=2000, replace="<TRUNCATED>"):
return s+replace

# %% ../nbs/00_core.ipynb
_final_prompt = dict(role="user", content="You have no more tool uses. Please summarize your findings. If you did not complete your goal please tell the user what further work needs to be done so they can choose how best to proceed.")
_final_prompt = dict(role="user", content="You have used all your tool calls for this turn. Please summarize your findings. If you did not complete your goal, tell the user what further work is needed. You may use tools again on the next user message.")

_cwe_msg = "ContextWindowExceededError: Do no more tool calls and complete your response now. Inform user that you ran out of context and explain what the cause was. This is the response to this tool call, truncated if needed: "

Expand Down
8 changes: 4 additions & 4 deletions nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,7 @@
"outputs": [],
"source": [
"#| export\n",
"_final_prompt = dict(role=\"user\", content=\"You have no more tool uses. Please summarize your findings. If you did not complete your goal please tell the user what further work needs to be done so they can choose how best to proceed.\")\n",
"_final_prompt = dict(role=\"user\", content=\"You have used all your tool calls for this turn. Please summarize your findings. If you did not complete your goal, tell the user what further work is needed. You may use tools again on the next user message.\")\n",
"\n",
"_cwe_msg = \"ContextWindowExceededError: Do no more tool calls and complete your response now. Inform user that you ran out of context and explain what the cause was. This is the response to this tool call, truncated if needed: \""
]
Expand Down Expand Up @@ -3063,7 +3063,7 @@
"\n",
"{'tool_call_id': 'call_0-v0en5bTn_cpUmdAErlRQ', 'role': 'tool', 'name': 'simple_add', 'content': '12'}\n",
"\n",
"{'role': 'user', 'content': 'You have no more tool uses. Please summarize your findings. If you did not complete your goal please tell the user what further work needs to be done so they can choose how best to proceed.'}\n",
"{'role': 'user', 'content': 'You have used all your tool calls for this turn. Please summarize your findings. If you did not complete your goal, tell the user what further work is needed. You may use tools again on the next user message.'}\n",
"\n",
"Message(content=\"I used the tool to calculate 5 + 7, and the result is 12.\\n\\nIf you have any more calculations or questions, please let me know how you'd like to proceed, as I currently cannot use additional tools.\", role='assistant', tool_calls=None, function_call=None, provider_specific_fields={'refusal': None}, annotations=[])\n",
"\n"
Expand Down Expand Up @@ -3688,7 +3688,7 @@
"\n",
"{'tool_call_id': 'call_xHDw5-dvT7i0EvwSrDIsEg', 'role': 'tool', 'name': 'simple_add', 'content': '12'}\n",
"\n",
"{'role': 'user', 'content': 'You have no more tool uses. Please summarize your findings. If you did not complete your goal please tell the user what further work needs to be done so they can choose how best to proceed.'}\n",
"{'role': 'user', 'content': 'You have used all your tool calls for this turn. Please summarize your findings. If you did not complete your goal, tell the user what further work is needed. You may use tools again on the next user message.'}\n",
"\n",
"Message(content='Based on my calculations, I can summarize my findings.\\n\\nThe primary goal was to calculate 5 + 7. Using the tool, I found that **5 + 7 = 12**.\\n\\nIn addition to this, I also performed a calculation and found that **6 + 7 = 13**.\\n\\nThe initial goal of calculating 5 + 7 has been successfully completed. There is no further work that needs to be done to answer your original question.', role='assistant', tool_calls=None, function_call=None, images=[], thinking_blocks=[], provider_specific_fields=None)\n",
"\n"
Expand Down Expand Up @@ -3793,7 +3793,7 @@
" 'name': 'simple_add',\n",
" 'content': '8'},\n",
" {'role': 'user',\n",
" 'content': 'You have no more tool uses. Please summarize your findings. If you did not complete your goal please tell the user what further work needs to be done so they can choose how best to proceed.'},\n",
" 'content': 'You have used all your tool calls for this turn. Please summarize your findings. If you did not complete your goal, tell the user what further work is needed. You may use tools again on the next user message.'},\n",
" Message(content='Based on my previous action, I used the `simple_add` tool to calculate the sum of 5 and 3.\\n\\n**Summary of Findings:**\\nThe result of 5 + 3 is 8.\\n\\nThe goal has been completed, and no further work is necessary for this request.', role='assistant', tool_calls=None, function_call=None, images=[], thinking_blocks=[], provider_specific_fields=None),\n",
" {'role': 'user', 'content': 'Now, tell me a joke based on that result.'},\n",
" Message(content='Of course!\\n\\nWhat did the number 0 say to the number 8?\\n\\n\"Nice belt!\"', role='assistant', tool_calls=None, function_call=None, images=[], thinking_blocks=[], provider_specific_fields=None)]"
Expand Down
Loading