Resolvedconflicts

This commit is contained in:
2024-02-06 02:08:08 +01:00
4 changed files with 12 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import scraper_functions as sf
import ollama
def processmsg(msg, rcpt):
if "youtube.com/watch" in msg:
@@ -8,4 +8,12 @@ def processmsg(msg, rcpt):
def command(msg, rcpt):
if msg.startswith("!help"):
return "chatbot commands: \n" + "!help Show this help page"
response = "chatbot commands: \n"
response += "!help Show this help page"
response += "!ai [message] Ask llama2"
return response
elif msg.startswith("!ai"):
client = ollama.Client(host='https://ollama.krov.dmz.rs')
response = client.chat(model='llama2-uncensored:latest', messages=[{'role':'user','content':f'{msg[4:]}'}])
return(response['message']['content'])