ORB/ClipAssist.py
2026-05-20 13:08:13 -04:00

27 lines
673 B
Python

import ollama
import pyperclip
from time import sleep as zz
import sys
def main():
"""It's an app, so it might as well look like one."""
lc = ""
memory = []
while "God is in heaven":
clip = pyperclip.paste()
if clip == lc:
zz(1) #We can pool every second, probably
continue
print("Me thinking...")
lc = clip
memory.append({'role':"user", 'content':clip})
response = ollama.chat(
model='cw',
messages = memory#[-1] # rm comment for no memory,
)
print(response.message.content + '\n\n\n')
if __name__ == '__main__':
main()
sys.exit(0)