formatting
This commit is contained in:
parent
b20551a5b3
commit
0970b79e23
3 changed files with 69 additions and 0 deletions
27
ClipAssist.py
Normal file
27
ClipAssist.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue