Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webui select model list is empty #5

Open
Dev-Wiki opened this issue Jun 21, 2023 · 8 comments
Open

webui select model list is empty #5

Dev-Wiki opened this issue Jun 21, 2023 · 8 comments

Comments

@Dev-Wiki
Copy link

docker compose install localai and web ui:

version: '3.6'

services:
  api:
    image: quay.io/go-skynet/local-ai:latest
    ports:
      - 8080:8080
    env_file:
      - .env
    volumes:
      - ./models:/models:cached
    command: ["/usr/bin/local-ai" ]

  frontend:
    image: quay.io/go-skynet/localai-frontend:master
    ports:
      - 3000:3000

build result:

$ docker-compose up -d --pull always
[+] Running 2/2
 ✔ frontend Pulled                                                                                                 3.2s
 ✔ api Pulled                                                                                                      3.2s
[+] Building 0.0s (0/0)
[+] Running 2/0
 ✔ Container localai-frontend-1  Running                                                                           0.0s
 ✔ Container localai-api-1       Running                                                                           0.0s


$ curl http://localhost:8080/v1/models
{"object":"list","data":[{"id":"ggml-gpt4all-j","object":"model"}]}

but,the webui:
image

@weselben
Copy link

weselben commented Jul 22, 2023

I think i found the issue, (or maybe its a new one 😄 )
image

Cross-Origin Resource Sharing error: MissingAllowOriginHeader

@blablazzz
Copy link

same for me. Model list is empty even though i have models.

@mate1213
Copy link

Hi!
I've setted the .env parameters in the .env file, and added:
REACT_APP_API_HOST=172.16.1.94:8081

Which points to the backend. Sadly I still have the same issue.... And I don't understand why does it not work.

@partisansb
Copy link

Same problem here... Inspecting the container files in Docker Desktop, I can see that the model files are loaded in the models folder in the api container. I inspected the .js file in the frontend container but I couldn't make sense of it. I did find a reference to to a folder /v1/models and i changed that to just /models, but it didn't change anything. I haven't seen any responses to any issues in this repo so I'm not holding out for anything soon,,, :(

@partisansb
Copy link

partisansb commented Jan 21, 2024

When I run $npm start, the browser opens and the interface pops up... Still no Models... I edited the line :
const host = process.env.REACT_APP_API_HOST;
to read :
const host = "http://127.0.0.1:8080";
in ChatGptInterface.js

In the console I have this message :

`Compiled successfully!

You can now view chat-gpt-interface in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://192.168.0.13:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

webpack compiled successfully`

However $./local-ai is running on http://127.0.0.1:8080 │ │ (bound on host 0.0.0.0 and port 8080)
So I don't think they can see each other... How do I resolve this?

I had the same issue when running docker-compose... No modules in the dropdown list, even though inspecting the api container files I could see the models in the model folder... Any ideas?

@weselben
Copy link

weselben commented Jan 22, 2024

I believe the issue can be resolved by including the "MissingAllowOriginHeader" parameter in the header of the model request. However, I'm unsure about the implementation process for this in the project. Perhaps someone else could test and confirm its effectiveness.

Edit:
What about this #7?

@Dhruvgera
Copy link
Owner

I believe the issue can be resolved by including the "MissingAllowOriginHeader" parameter in the header of the model request. However, I'm unsure about the implementation process for this in the project. Perhaps someone else could test and confirm its effectiveness.

Edit: What about this #7?

Thanks for bringing that to my notice, I'll test and merge it if it works without issues!

@LeGrandMonoss
Copy link

I believe the issue can be resolved by including the "MissingAllowOriginHeader" parameter in the header of the model request. However, I'm unsure about the implementation process for this in the project. Perhaps someone else could test and confirm its effectiveness.
Edit: What about this #7?

Thanks for bringing that to my notice, I'll test and merge it if it works without issues!

Did it work ?
I have the same problem as you, but their solution didn't work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants