bit-gpt / app

BitGPT it's your personal AI in your pocket
https://bitgpt.network
MIT License
457 stars 40 forks source link

Correction in API Base URL for chat/completion requests #539

Closed sekulicd closed 11 months ago

sekulicd commented 11 months ago

The current base URL used for chat/completion requests is pointing to an incorrect host(62.4.58.131), causing a failure in request processing.

http://62.4.58.131/gpt4all-lora-q4/v1/chat/completions

@tiero @Janaka-Steph

tiero commented 11 months ago

This seems to be drives from your local IP of your home network?

Yes that should have been localhost and not using ifconfig

tiero commented 11 months ago

this seems connected to https://github.com/premAI-io/prem-app/issues/474

Janaka-Steph commented 11 months ago

Testing docker locally, you can see that baseUrl received from the daemon is wrong. This is my public IP.

Screenshot 2023-11-11 at 09 49 31
tiero commented 11 months ago

I think that is kinda expected, so we need to think if we want to have a special rule for localhost eventually in the frontend or daemon. This is only for development after all

tiero commented 11 months ago

I have a different result instead @Janaka-Steph using https://demo.prem.ninja

The Service Details page shows correctly the baseUrl for LLama service

image

But then the playground chat calls the wrong baseUrl ie.

image
Janaka-Steph commented 11 months ago

Can you check TanStack devtool ?

tiero commented 11 months ago

I am on released on demo.prem.ninja, is there a way to do from there? or build the app with Node.js directly on the server?

tiero commented 11 months ago

I am making a new Docker release using latest main, let's see if it fixes

Janaka-Steph commented 11 months ago

We can add devtool on production, hidden and lazy loaded, triggered by a command in browser console

Janaka-Steph commented 11 months ago

The front just use service.baseUrl here

tiero commented 11 months ago

But baseUrl in the service detail page seems correct

tiero commented 11 months ago

Fixed using the latest main!

image
Janaka-Steph commented 11 months ago

Surprise!