@@ -118,6 +118,8 @@ python main.py --human me.txt
|
||||
While using MemGPT via the CLI you can run various commands:
|
||||
|
||||
```text
|
||||
//
|
||||
enter multiline input mode (type // again when done)
|
||||
/exit
|
||||
exit the CLI
|
||||
/save
|
||||
|
||||
16
main.py
16
main.py
@@ -105,7 +105,21 @@ async def main():
|
||||
# Commands to not get passed as input to MemGPT
|
||||
if user_input.startswith('/'):
|
||||
|
||||
if user_input.lower() == "/exit":
|
||||
if user_input == "//":
|
||||
print("Entering multiline mode, type // when done")
|
||||
user_input_list = []
|
||||
while True:
|
||||
user_input = console.input("[bold cyan]>[/bold cyan] ")
|
||||
clear_line()
|
||||
if user_input == "//":
|
||||
break
|
||||
else:
|
||||
user_input_list.append(user_input)
|
||||
|
||||
# pass multiline inputs to MemGPT
|
||||
user_message = system.package_user_message("\n".join(user_input_list))
|
||||
|
||||
elif user_input.lower() == "/exit":
|
||||
break
|
||||
|
||||
elif user_input.lower() == "/savechat":
|
||||
|
||||
Reference in New Issue
Block a user