Wrap !multi in single quotes, for consistency with exit/quit

This commit is contained in:
Simon Willison 2023-09-12 10:45:02 -07:00
parent 37f85b3a1f
commit 9e529bb36a
4 changed files with 7 additions and 6 deletions

View file

@ -58,6 +58,7 @@ llm chat -m chatgpt
```
Chatting with gpt-3.5-turbo
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> Tell me a joke about a pelican
Why don't pelicans like to tip waiters?

View file

@ -141,7 +141,7 @@ llm chat -t cheesecake
```
Chatting with gpt-4
Type 'exit' or 'quit' to exit
Type !multi to enter multiple lines, then !end to finish
Type '!multi' to enter multiple lines, then '!end' to finish
> who are you?
I am a sentient cheesecake, meaning I am an artificial
intelligence embodied in a dessert form, specifically a
@ -161,7 +161,7 @@ If your pasted text might itself contain a `!end\n` line, you can set a custom d
```
Chatting with gpt-4
Type 'exit' or 'quit' to exit
Type !multi to enter multiple lines, then !end to finish
Type '!multi' to enter multiple lines, then '!end' to finish
> !multi custom-end
Explain this error:

View file

@ -405,7 +405,7 @@ def chat(
click.echo("Chatting with {}".format(model.model_id))
click.echo("Type 'exit' or 'quit' to exit")
click.echo("Type !multi to enter multiple lines, then !end to finish")
click.echo("Type '!multi' to enter multiple lines, then '!end' to finish")
in_multi = False
accumulated = []
end_token = "!end"

View file

@ -27,7 +27,7 @@ def test_chat_basic(mock_model, logs_db):
assert result.output == (
"Chatting with mock"
"\nType 'exit' or 'quit' to exit"
"\nType !multi to enter multiple lines, then !end to finish"
"\nType '!multi' to enter multiple lines, then '!end' to finish"
"\n> Hi"
"\none world"
"\n> Hi two"
@ -81,7 +81,7 @@ def test_chat_basic(mock_model, logs_db):
assert result2.output == (
"Chatting with mock"
"\nType 'exit' or 'quit' to exit"
"\nType !multi to enter multiple lines, then !end to finish"
"\nType '!multi' to enter multiple lines, then '!end' to finish"
"\n> Continue"
"\ncontinued"
"\n> quit"
@ -124,7 +124,7 @@ def test_chat_system(mock_model, logs_db):
assert result.output == (
"Chatting with mock"
"\nType 'exit' or 'quit' to exit"
"\nType !multi to enter multiple lines, then !end to finish"
"\nType '!multi' to enter multiple lines, then '!end' to finish"
"\n> Hi"
"\nI am mean"
"\n> quit"