diff --git a/01OS/01OS/server/skills/explore_functions.py b/01OS/01OS/server/skills/explore_functions.py deleted file mode 100644 index bb82bc7..0000000 --- a/01OS/01OS/server/skills/explore_functions.py +++ /dev/null @@ -1,5 +0,0 @@ -import sys - -def explore_functions(): - """None""" - import sys diff --git a/01OS/01OS/server/skills/fibonacci.py b/01OS/01OS/server/skills/fibonacci.py deleted file mode 100644 index ac92641..0000000 --- a/01OS/01OS/server/skills/fibonacci.py +++ /dev/null @@ -1,5 +0,0 @@ - - -def fibonacci(): - """None""" - fib = [0, 1] diff --git a/01OS/01OS/server/skills/open_ableton.py b/01OS/01OS/server/skills/open_ableton.py new file mode 100644 index 0000000..73c18c3 --- /dev/null +++ b/01OS/01OS/server/skills/open_ableton.py @@ -0,0 +1,25 @@ +def openAbleton(): + """open ableton""" + + import os + os.system("open /Applications/Ableton\ Live\ 10\ Suite.app") + + + import os + + # Search can be slow if there are many files + # This will search in the Applications folder only + applications = "/Applications/" + + # walk function will generate the file names in a directory tree + # We will look for any application that contains "Ableton" in its name + for foldername, subfolders, filenames in os.walk(applications): + for filename in filenames: + if "Ableton" in filename: + ableton_path = os.path.join(foldername, filename) + break + + ableton_path + + + os.system("open /Applications/Ableton\ Live\ 11\ Intro.app") diff --git a/01OS/01OS/server/skills/schedule_fixed.py b/01OS/01OS/server/skills/schedule_fixed.py deleted file mode 100644 index 0c26a57..0000000 --- a/01OS/01OS/server/skills/schedule_fixed.py +++ /dev/null @@ -1,5 +0,0 @@ -import time - -def schedule_fixed(): - """None""" - time.sleep(delay) diff --git a/01OS/01OS/server/system_message.py b/01OS/01OS/server/system_message.py index 121d59d..bd0f8c4 100644 --- a/01OS/01OS/server/system_message.py +++ b/01OS/01OS/server/system_message.py @@ -172,7 +172,7 @@ finally: # SKILLS -You may use the following functions (assume they're imported) to complete your goals whenever possible: +Try to use the following functions (assume they're imported) to complete your goals whenever possible: {{ import sys @@ -186,9 +186,9 @@ interpreter.model = "gpt-3.5" combined_messages = "\\n".join(json.dumps(x) for x in messages[-3:]) #query_msg = interpreter.chat(f"This is the conversation so far: {combined_messages}. What is a <10 words query that could be used to find functions that would help answer the user's question?") -query_msg = combined_messages -query = query_msg[0]['content'] -interpreter.computer.skills.path = OI_SKILLS_DIR +#query = query_msg[0]['content'] +query = combined_messages +interpreter.computer.skills.path = '''OI_SKILLS_DIR''' skills = interpreter.computer.skills.search(query) lowercase_skills = [skill[0].lower() + skill[1:] for skill in skills] diff --git a/01OS/01OS/server/teach.py b/01OS/01OS/server/teach.py index 86eac89..0435f11 100644 --- a/01OS/01OS/server/teach.py +++ b/01OS/01OS/server/teach.py @@ -87,6 +87,7 @@ def teach(): interpreter.computer.languages = [l for l in interpreter.computer.languages if l.name.lower() == "python"] interpreter.force_task_completion = True for chunk in interpreter.chat(step, stream=True, display=False): + print(chunk) if chunk["role"] == "computer" and "start" not in chunk and "end" not in chunk: chunk_type = chunk["type"] chunk_content = chunk["content"]