Compare commits
2 Commits
161abdf32e
...
c011383f0e
Author | SHA1 | Date | |
---|---|---|---|
c011383f0e | |||
544f8052e9 |
@ -4,9 +4,8 @@ import scraper_functions as sf
|
||||
def processmsg(msg, rcpt):
|
||||
if "youtube.com/watch" in msg:
|
||||
return msg.replace("youtube.com", "iv.datura.network")
|
||||
elif msg.startswith("!wiki"):
|
||||
cmd, query = msg.split(" ", 1)
|
||||
return sf.query_external_website("https://en.wikipedia.org", "/wiki/" + query)
|
||||
elif msg.startswith("!"):
|
||||
return command(msg)
|
||||
elif "good bot" in msg:
|
||||
return "^_^"
|
||||
|
||||
@ -21,4 +20,7 @@ def command(msg, rcpt):
|
||||
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'])
|
||||
elif msg.startswith("!wiki"):
|
||||
cmd, query = msg.split(" ", 1)
|
||||
return sf.query_external_website("https://en.wikipedia.org", "/wiki/" + query)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user