Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "SINBot",
"type": "commonjs",
"version": "3.0.0",
"version": "3.0.1",
"description": "Discord bot appropriate for Elite Dangerous",
"main": "server/server.js",
"dependencies": {
Expand Down
7 changes: 6 additions & 1 deletion server/commands/elite/showcmdr.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ const elite = require(path.resolve(base.path, 'server/elite/elite.js'));
module.exports = {
data: new SlashCommandBuilder()
.setName('showcmdr')
.setDescription('Show your EDSM name, if registered'),
.setDescription('Show your EDSM name, if registered')
.addStringOption(option =>
option
.setName('edsm_name')
.setDescription('Your CMDRs name on EDSM')
.setRequired(true)),
async execute(interaction) {
var edsmName = elite.getEdsmName(interaction);
if (edsmName) {
Expand Down
6 changes: 3 additions & 3 deletions server/ollama.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ var config = require('../config.json');

const { Ollama} = require('ollama');

const ollama = new Ollama({url:config.ollamaAddr});

let ollamaConfig = config.ollama;

const ollama = new Ollama({url:ollamaConfig.addr});

function makeHistoryFilepath(user) {
return path.resolve(base.path, `server/history/${user}.json`);
}
Expand Down Expand Up @@ -78,7 +78,7 @@ exports.chat = async function(input, user) {
console.log(JSON.stringify(history,null,2));
}
let response = await ollama.chat({
model: config.ollamaModel,
model: ollamaConfig.model,
messages: history,
});
history.push(response.message);
Expand Down