This commit is contained in:
cirroskais 2024-04-20 00:16:02 -04:00
parent 18101ce2b3
commit 7f1eb8ab1f
No known key found for this signature in database
GPG key ID: 5FC73EBF2678E33D

View file

@ -3,7 +3,7 @@ import { type Interaction } from "@discordeno/bot";
import SlashCommand from "../lib/classes/SlashCommand";
import { Ollama } from "ollama";
const ollama = new Ollama({ host: "http://localhost:11434" });
const ollama = new Ollama({ host: "http://host.docker.internal:11434" });
export default class extends SlashCommand implements Command {
name = "ai";
@ -22,7 +22,7 @@ export default class extends SlashCommand implements Command {
let index = 0;
const response = await ollama.chat({
model: "terrye",
model: "terry",
messages: [{ role: "user", content: input }],
stream: true,
});