forked from Decentrala/chatbot
add ollama to help
This commit is contained in:
parent
c2286ae0a6
commit
bc2e7422f5
@ -8,7 +8,10 @@ def processmsg(msg, rcpt):
|
|||||||
|
|
||||||
def command(msg, rcpt):
|
def command(msg, rcpt):
|
||||||
if msg.startswith("!help"):
|
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"):
|
elif msg.startswith("!ai"):
|
||||||
client = ollama.Client(host='https://ollama.krov.dmz.rs')
|
client = ollama.Client(host='https://ollama.krov.dmz.rs')
|
||||||
response = client.chat(model='llama2-uncensored:latest', messages=[{'role':'user','content':f'{msg[4:]}'}])
|
response = client.chat(model='llama2-uncensored:latest', messages=[{'role':'user','content':f'{msg[4:]}'}])
|
||||||
|
Loading…
Reference in New Issue
Block a user