RoboWaiter/robowaiter/llm_client/MemGPT_simple/main.py

37 lines
859 B
Python
Raw Normal View History

2023-11-10 09:50:58 +08:00
import utils
2023-11-19 21:16:51 +08:00
from functions import FUNCTIONS
2023-11-10 09:50:58 +08:00
from agent import Agent
2023-11-13 15:40:19 +08:00
import urllib3
2023-11-19 21:16:51 +08:00
2023-11-13 15:40:19 +08:00
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2023-11-19 21:16:51 +08:00
2023-11-10 09:50:58 +08:00
def run_agent_loop(agent):
while True:
user_input = input("You: ")
if user_input == "/exit":
break
user_input = user_input.rstrip()
user_message = utils.package_user_message(user_input)
agent.step(user_message)
if __name__ == "__main__":
persona = utils.get_persona_text()
human = utils.get_human_text()
system = utils.get_system_text()
2023-11-13 15:40:19 +08:00
2023-11-19 21:16:51 +08:00
# print("system:", system)
# print("persona:", persona)
# print("human:", human)
agent = Agent(
model="RoboWaiter",
system=system,
functions_description=FUNCTIONS,
persona_notes=persona,
human_notes=human,
)
2023-11-10 09:50:58 +08:00
run_agent_loop(agent)