new file: .gitignore
new file: custom_models/3.1/Modelfile new file: custom_models/3.1/reload llama3.1.cmd new file: custom_models/3.2/Modelfile new file: custom_models/3.2/reload llama3.2.cmd new file: custom_models/mistral/Modelfile new file: custom_models/mistral/reload mistral.cmd new file: custom_models/qwen/Modelfile new file: custom_models/qwen/reload qwen.cmd new file: main.js new file: package-lock.json new file: package.json new file: test.js new file: tools.js
This commit is contained in:
28
tools.js
Normal file
28
tools.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const { Webhook } = require('discord-webhook-node');
|
||||
const { Builder, Browser, By } = require('selenium-webdriver');
|
||||
const firefox = require('selenium-webdriver/firefox');
|
||||
|
||||
const discordHook = new Webhook("https://discord.com/api/webhooks/1328616300544786444/oCwaJ1HQW_Hk0_BQB6lWfuLSikhGOzEJqaOr37MNb6lkICk0Bllk7izVPdmXHKm1JhAN");
|
||||
|
||||
|
||||
module.exports = class tools {
|
||||
constructor() {
|
||||
this.availableFunctions = {
|
||||
sendMessage: this.sendMessage,
|
||||
};
|
||||
const toolFunction = this.availableFunctions["sendMessage"];
|
||||
toolFunction({ target: "TEST", message: "message" });
|
||||
}
|
||||
|
||||
processToolCall(toolCalls, messages) { }
|
||||
|
||||
sendMessage(args) {
|
||||
try {
|
||||
discordHook.setUsername(args.target.toString().replace("discord", "").replace("Discord", ""));
|
||||
discordHook.send(args.message.toString());
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
return "Message: " + args.message + ", successfully send to " + args.target;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user