Signal · Methods
signal.history
signal.history(messages) sets the conversation history that is sent before the next prompt. Signal keeps no state between calls: each result returns its conversation as history, and passing that to .history() continues the conversation. The model’s replies are scripted; no model is called.
[
{
role: 'user',
content: 'Two for The Tempest on Saturday, please. Grace',
},
{
role: 'assistant',
content: 'Two seats on Saturday, Grace. Anything else?',
},
]'Make it three.'
[
{
role: 'user',
content: 'Two for The Tempest on Saturday, please. Grace',
},
{
role: 'assistant',
content: 'Two seats on Saturday, Grace. Anything else?',
},
{ role: 'user', content: 'Make it three.' },
]Runs in this page on the installed package. The input and the expected output are defined by the example.