>>> outputs
['[INST] <<SYS>>\nYou are an expert blackjack player. Every turn, you\'ll see your current sum, the dealer\'s showing card value, and whether you have a usable ace. Win by exceeding the dealer\'s hand but not exceeding 21.\nDecide whether to stay with your current sum by writing "Action: 0" or accept another card by writing "Action: 1". Accept a card unless very close to 21.\n<</SYS>>\n\nYou: 15. Dealer: 5. You have no ace. [/INST] Action: 0']
outputs after add:
>>> outputs
[' Action: 0']
we get the expected action by truncating the beginning part of the llm output, which is identical to the input of llm.
In
agent.py
, methodAgent.llm()
, I'm wondering we should add two statements before and afterself.model.generate()
, as:outputs before add:
outputs after add:
we get the expected action by truncating the beginning part of the llm output, which is identical to the input of llm.