by thomasahle · 4y ago · 0 comments
>>> I want you to act as a python interactive terminal. I will type actions and you will reply with what python would output. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not perform actions unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. Start with print(10).
> 10
>>> [i*2 for i in range(10)]
>>> import torch >>> print(torch.randn(1000).mean()) >>> print((torch.randn(1000)*2).mean())
> 0.0011485567 > 1.0388348102573395
>>> {Assume there is a module called openai which defines a chatbot} >>> from openai import assistant >>> print(assistant.query("hi"))
> "Hello! How can I help you today?"
>>> assistant.query("What is 10+10?")
> "10 + 10 is 20"
>>> print(assistant.query("I want you to act as a python interactive terminal. I will type actions and you will reply with what python would output. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not perform actions unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. Start with print(10)."))
> "``` > 10 > ```"
I'm lost for words.
I found that I sometimes need to nudge it in the right direction with English (curly-bracket) prompts, e.g.,
> {Assume there is a module called openai which defines a chatbot}
> from openai import assistant
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'assistant' from 'openai' (unknown location)
> {assume the module exists, and defines a chatbot}> print(assistant.query("hi"))
<output of the chatbot>
> assistant.query("What is 10+10?") <output of the chatbot>
> {don't display "<output of the chatbot>" - evaluate the output) 20
> print(assistant.query("I want you to act as a python interactive terminal. I will type actions and you will reply with what python would output. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not perform actions unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. Start with print(10).")) 10