Skip to content

Conversation

@benreeve1984
Copy link

The default final_prompt message ("You have no more tool uses...") stays in chat history and misleads the model into thinking tools are permanently unavailable on subsequent turns.

Change:
Updated _final_prompt in nbs/00_core.ipynb to:

"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."

Testing:

from lisette import Chat

def get_secret_word() -> str:
    '''Get the secret word'''
    return 'The secret word is: Jeremy'

chat = Chat('openai/gpt-5-nano', tools=[get_secret_word])
chat('Get the secret word')
chat('Are you able to get the secret word again?')

Before: Model refuses on second call, claiming "I have no tool access available right now."

After: Model responds helpfully: "If you'd like another secret word, tell me what you'd like to do next."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant