app icon indicating copy to clipboard operation
app copied to clipboard

browser: playgrounds make the request to wrong path

Open tiero opened this issue 2 years ago • 2 comments

I am using browser with gateway and domain NOT set

Chat

It's doing a POST to /v1/chat/completions instead it should have been /llama-2-13b-chat/v1/chat/completions

Also, the playground URL is undefined in the bar image

Image

/prem-image/stable-diffusion-xl/undefined/v1/images/generations

instead of

/stable-diffusion-xl/v1/images/generations

tiero avatar Nov 03 '23 01:11 tiero

Regarding Chat, please check that service.baseUrl is defined in get_service request.

The code is:

setChatServiceUrl(`${service?.baseUrl ?? ""}/v1/chat/completions`);

Janaka-Steph avatar Nov 03 '23 11:11 Janaka-Steph

When testing in localhost with docker-compose, it seems to not take into account localhost, and default to the IP address of my home router LAN.

This is only helpful for development, so not sure if we need to add extra rule in frontend to check for localhost to not consider whatever the daemon is returning to us

image

tiero avatar Nov 07 '23 17:11 tiero