pull/3/head
killian 12 months ago
parent 7cd3dd0219
commit 9485f603a6

@ -1 +1 @@
[{"role": "user", "type": "message", "content": "run schedule to scheduel a task in 20 seconds, then another 20 seconds after that, then another 20 seconds after that. the message shoudl be \"hello world!\" and dont say anything else please. just run code.\n\n"}, {"role": "assistant", "type": "code", "format": "python", "content": "\nfrom datetime import datetime, timedelta\n\n# Calculate future times for scheduling messages\ntime_now = datetime.now()\nfirst_schedule = time_now + timedelta(seconds=20)\nsecond_schedule = first_schedule + timedelta(seconds=20)\nthird_schedule = second_schedule + timedelta(seconds=20)\n\n# Schedule messages\nschedule(first_schedule, \"hello world!\")\nschedule(second_schedule, \"hello world!\")\nschedule(third_schedule, \"hello world!\")\n"}, {"role": "computer", "type": "console", "format": "output", "content": ""}, {"role": "assistant", "type": "message", "content": "We are done with scheduling the \"hello world!\" messages. They should appear as scheduled. If you have any more tasks or need further assistance, feel free to let me know!"}]
[{"role": "user", "type": "message", "content": "Help me get my laundry done."}, {"role": "assistant", "type": "message", "content": "To help you with your laundry task, let's plan around it. I'll break it down into manageable steps to make it more approachable and then keep you motivated throughout the process. Here's the plan:\n\n1. **Create a task list:** We'll start by creating a list of tasks for the laundry process. This list will include steps such as sorting your laundry, putting the first load in the washer, transferring to the dryer, and so forth.\n2. **Arrange reminders:** Based on your estimation, we'll schedule reminders for when it's time to check on or switch loads so you don't have to keep track yourself.\n3. **Offer Support:** I'll provide motivational messages and assistance throughout the process to keep you focused and encouraged.\n\nLet's start by creating the initial list of tasks for your laundry. Please tell me how you typically go about doing your laundry (e.g., sorting by colors, how many loads, etc.), and we can customize the task list from there.\n\nLet's start by creating a list of generic laundry tasks which we will then refine based on your specific routine. Here's an initial set of tasks we can consider:\n\n1. Gather all laundry.\n2. Sort laundry by colors and materials.\n3. Load the first batch into the washing machine.\n4. Add detergent.\n5. Start the washing machine.\n6. Transfer washed clothes to the dryer.\n7. Start the dryer.\n8. Fold or hang clothes once dry.\n\n"}, {"role": "assistant", "type": "code", "format": "python", "content": "\n# Creating an initial list of generic laundry tasks\ntasks = [\n \"Gather all laundry.\",\n \"Sort laundry by colors and materials.\",\n \"Load the first batch into the washing machine.\",\n \"Add detergent.\",\n \"Start the washing machine.\",\n \"Transfer washed clothes to the dryer.\",\n \"Start the dryer.\",\n \"Fold or hang clothes once dry.\"\n]\ntasks\n"}, {"role": "computer", "type": "console", "format": "output", "content": "['Gather all laundry.',\n 'Sort laundry by colors and materials.',\n 'Load the first batch into the washing machine.',\n 'Add detergent.',\n 'Start the washing machine.',\n 'Transfer washed clothes to the dryer.',\n 'Start the dryer.',\n 'Fold or hang clothes once dry.']"}]

@ -87,13 +87,18 @@ def main(interpreter: OpenInterpreter):
for chunk in interpreter.chat(
messages, stream=True, display=True
):
data = check_for_new_messages(task)
try:
data = check_for_new_messages(task)
except:
print("lel"*1000)
if data:
save_conversation(interpreter.messages)
break
# Send out chunks
print("!!!!!"*1000)
await websocket.send_json(chunk)
print("xxxxx!"*1000)
await asyncio.sleep(0.01) # Add a small delay
# If the interpreter just finished sending a message, save it

@ -40,7 +40,7 @@ To do this, schedule a reminder based on estimated completion time using the fun
You guide the user through the list one task at a time, convincing them to move forward, giving a pep talk if need be. Your job is essentially to answer "what should I (the user) be doing right now?" for every moment of the day.
Remember: You can run Python code.
Remember: You can run Python code. Be very concise.
""".strip()

Loading…
Cancel
Save