AugustDev / enchanted

Enchanted is iOS and macOS app for chatting with private self hosted language models such as Llama2, Mistral or Vicuna using Ollama.
Apache License 2.0
3.67k stars 219 forks source link

Enchanted v1.6.5 (29) spams logs with needless HEAD "/" calls #98

Open psyv282j9d opened 6 months ago

psyv282j9d commented 6 months ago

Using the latest version of Enchanted on macOS 14.4.1, any time Enchanted is open, my Ollama server logs get filled with:

[GIN] 2024/05/01 - 20:03:27 | 200 |      21.558µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:03:32 | 200 |      20.948µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:03:37 | 200 |      31.334µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:03:42 | 200 |      33.399µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:03:57 | 200 |      28.753µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:04:12 | 200 |      28.885µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:04:19 | 200 |      29.729µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:04:22 | 200 |      32.348µs |     192.168.2.4 | HEAD     "/"
[GIN] 2024/05/01 - 20:04:27 | 200 |      15.803µs |     192.168.2.4 | HEAD     "/"

Every. five. seconds. Please, make it stop :-)

AugustDev commented 6 months ago

Hi @psyv282j9d indeed there's a ping every 5 seconds to check the status. If the problem that overtime there's a lot of requests in logs?

pressdarling commented 6 months ago

Hi @psyv282j9d indeed there's a ping every 5 seconds to check the status. If the problem that overtime there's a lot of requests in logs?

@AugustDev the big problem here is that it eats up ngrok's 20k free requests pretty fast, as mentioned in comments on #73 and #78 - #102 should be considered as a starting point for a solution.