clean, remove prompt and user info from logs, more docs edits

This commit is contained in:
Aidan 2025-06-27 03:15:49 -04:00
parent f43fcd470f
commit e1e017d32c
3 changed files with 8 additions and 6 deletions

View file

@ -70,6 +70,11 @@ You can also run Kowalski using Docker, which simplifies the setup process. Make
2. **Make sure to setup your `.env` file first!** 2. **Make sure to setup your `.env` file first!**
> [!TIP]
> If you intend to setup AI, the defaults for Docker are already included (just uncomment) and don't need to be changed.
>
> Further setup may be needed for GPUs. See the Ollama documentation for more.
3. **Run the container** 3. **Run the container**
```bash ```bash
@ -129,7 +134,7 @@ chmod +x src/plugins/yt-dlp/yt-dlp
**Q:** How can I disable AI features? **Q:** How can I disable AI features?
**A:** AI features are disabled by default, unless you have set `ollamaApi` in your `.env` file. Please remove or comment out this line to disable all AI functionality. **A:** AI features are disabled by default, unless you have set `ollamaEnabled` to `true` in your `.env` file. Set it back to `false` to disable.
## Contributors ## Contributors

View file

@ -227,8 +227,6 @@ export default (bot: Telegraf<Context>) => {
if (!ctx.message || !('text' in ctx.message)) return; if (!ctx.message || !('text' in ctx.message)) return;
const isAsk = ctx.message.text.startsWith("/ask") const isAsk = ctx.message.text.startsWith("/ask")
const model = isAsk ? flash_model : thinking_model const model = isAsk ? flash_model : thinking_model
console.log(model)
console.log(ctx.message.text)
const textCtx = ctx as TextContext; const textCtx = ctx as TextContext;
const reply_to_message_id = replyToMessageId(textCtx) const reply_to_message_id = replyToMessageId(textCtx)
const Strings = getStrings(languageCode(textCtx)) const Strings = getStrings(languageCode(textCtx))

View file

@ -32,7 +32,6 @@ import { flash_model, thinking_model } from "../commands/ai"
class Logger { class Logger {
private static instance: Logger private static instance: Logger
private thinking: boolean = false
private constructor() {} private constructor() {}
@ -44,7 +43,7 @@ class Logger {
} }
logCmdStart(user: string, type: "ask" | "think"): void { logCmdStart(user: string, type: "ask" | "think"): void {
console.log(`\n[✨ AI | START] Received /${type} for model ${type === "ask" ? flash_model : thinking_model} from ${user}`) console.log(`\n[✨ AI | START] Received /${type} for model ${type === "ask" ? flash_model : thinking_model}`)
} }
logThinking(chatId: number, messageId: number, thinking: boolean): void { logThinking(chatId: number, messageId: number, thinking: boolean): void {
@ -61,7 +60,7 @@ class Logger {
} }
logPrompt(prompt: string): void { logPrompt(prompt: string): void {
console.log(`[✨ AI | PROMPT] ${prompt.length} chars: ${prompt.substring(0, 50)}${prompt.length > 50 ? "..." : ""}`) console.log(`[✨ AI | PROMPT] ${prompt.length} chars input`)
} }
logError(error: any): void { logError(error: any): void {