nothingmn / Ollabotica

Ollabotica - Yet another telegram bot for Ollama
6 stars 2 forks source link

Improving instructions for first time users and can't get this to run #1

Open haydonryan opened 1 month ago

haydonryan commented 1 month ago

Hey there, I'm a first time user of Ollabotica and finding it hard to get things going.

I'm using the docker-compose method. Here's a bunch of things I had to "guess"

  1. ./chats:/app/chats - I'm assuming this is a directory i need to create first (otherwise docker-compose fails)
  2. appsettings.json - Assuming that AllowedChatIDsRaw is where the bot can chat, but i'm not clear what the difference is between admin and allowed chat bots.
    • OllamaURL - is this the openwebui OR ollama or both? Ollama afaik doesn't have tokens, so I'm assuming this is openweb-ui.
    • OllamaToken - I'm assuming this is the jwt token from openwebui not the api key.

I removed the discord and slack settings, and filled in the telegram and ollama tokens but I get errors - app is flapping:

telegram-bot-1  | fail: Microsoft.Extensions.Hosting.Internal.Host[11]
telegram-bot-1  |       Hosting failed to start
telegram-bot-1  |       System.ArgumentNullException: Value cannot be null. (Parameter 'token')
telegram-bot-1  |          at Telegram.Bot.TelegramBotClientOptions..ctor(String token, String baseUrl, Boolean useTestEnvironment)
telegram-bot-1  |          at Telegram.Bot.TelegramBotClient..ctor(String token, HttpClient httpClient, CancellationToken cancellationToken)
telegram-bot-1  |          at Ollabotica.BotServices.TelegramBotService.StartAsync(BotConfiguration botConfig) in /app/Ollabotica/BotServices/TelegramBotService.cs:line 45
telegram-bot-1  |          at Ollabotica.BotManager.StartBotsAsync() in /app/Ollabotica/BotManager.cs:line 29
telegram-bot-1  |          at Ollabotica.BotHostedService.StartAsync(CancellationToken cancellationToken) in /app/Ollabotica/BotHostedService.cs:line 19
telegram-bot-1  |          at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
telegram-bot-1  |          at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
telegram-bot-1  | Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'token')
telegram-bot-1  |    at Telegram.Bot.TelegramBotClientOptions..ctor(String token, String baseUrl, Boolean useTestEnvironment)
telegram-bot-1  |    at Telegram.Bot.TelegramBotClient..ctor(String token, HttpClient httpClient, CancellationToken cancellationToken)
telegram-bot-1  |    at Ollabotica.BotServices.TelegramBotService.StartAsync(BotConfiguration botConfig) in /app/Ollabotica/BotServices/TelegramBotService.cs:line 45
telegram-bot-1  |    at Ollabotica.BotManager.StartBotsAsync() in /app/Ollabotica/BotManager.cs:line 29
telegram-bot-1  |    at Ollabotica.BotHostedService.StartAsync(CancellationToken cancellationToken) in /app/Ollabotica/BotHostedService.cs:line 19
telegram-bot-1  |    at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
telegram-bot-1  |    at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
telegram-bot-1  |    at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
telegram-bot-1  |    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
telegram-bot-1  |    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
telegram-bot-1  |    at Ollabotica.Program.Main(String[] args) in /app/Ollabotica/Program.cs:line 52
telegram-bot-1  |    at Ollabotica.Program.<Main>(String[] args)

My Appsettings.json

{
  "Bots": [
    {
      "Name": "Skynet",
      "TelegramToken": "<<TELEGRAMTOKEN>>",
      "OllamaUrl": "https://openwebui.URL.com/ollama/api",
      "OllamaToken": "<<jwt token>>",
      "DefaultModel": "llama3.2:3b-instruct-q8_0-cpu-16",
      "AllowedChatIdsRaw": "<<telegramchat>>",
      "AdminChatIdsRaw": "<<telegramchat>>"
    }
    ]
}

Thankyou!

sebaxakerhtc commented 3 weeks ago

same here For now I found working one But here better functional! Especially I want to use openwebui models and API including SYSTEM prompt and run different models at the same time So, @nothingmn, we waiting for your response! Thank you for the project