Incorrect url for openai embeddings #1239

Closed
opened 2025-11-11 14:40:51 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @thienedits on GitHub (Jun 13, 2024).

Bug Report

Description

getting the error 404 Client Error: Not Found for url: https://api.openai.com/v1/embeddings/embeddings when uploading a file
Bug Summary:

Steps to Reproduce:

Expected Behavior:

Actual Behavior:

Environment

  • **Open WebUI Version: 0.3.4 dev branch

  • **Ollama (if applicable): 0.1.43

  • **Operating System: macOS 14.5

  • **Browser (if applicable): Chrome Version 126.0.6478.56 (Official Build) (arm64)

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:

Docker Container Logs:

2024-06-12 17:59:51 open-webui  | 404 Client Error: Not Found for url: https://api.openai.com/v1/embeddings/embeddings
2024-06-12 17:59:51 open-webui  | ERROR:apps.rag.main:'NoneType' object is not iterable
2024-06-12 17:59:51 open-webui  | Traceback (most recent call last):
2024-06-12 17:59:51 open-webui  |   File "/app/backend/apps/rag/main.py", line 934, in store_docs_in_vector_db
2024-06-12 17:59:51 open-webui  |     embeddings = embedding_func(embedding_texts)
2024-06-12 17:59:51 open-webui  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-12 17:59:51 open-webui  |   File "/app/backend/apps/rag/utils.py", line 236, in <lambda>
2024-06-12 17:59:51 open-webui  |     return lambda query: generate_multiple(query, func)
2024-06-12 17:59:51 open-webui  |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-12 17:59:51 open-webui  |   File "/app/backend/apps/rag/utils.py", line 229, in generate_multiple
2024-06-12 17:59:51 open-webui  |     embeddings.extend(f(query[i : i + batch_size]))
2024-06-12 17:59:51 open-webui  | TypeError: 'NoneType' object is not iterable
2024-06-12 17:59:51 open-webui  | INFO:     192.168.65.1:41540 - "POST /rag/api/v1/doc HTTP/1.1" 200 OK
2024-06-12 17:59:57 open-webui  | INFO:     127.0.0.1:33998 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:00:27 open-webui  | INFO:     127.0.0.1:47498 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:00:57 open-webui  | INFO:     127.0.0.1:42250 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:01:27 open-webui  | INFO:     127.0.0.1:33964 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:01:57 open-webui  | INFO:     127.0.0.1:48594 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:02:27 open-webui  | INFO:     127.0.0.1:56040 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:02:57 open-webui  | INFO:     127.0.0.1:35130 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:03:27 open-webui  | INFO:     127.0.0.1:39138 - "GET /health HTTP/1.1" 200 OK
2024-06-12 18:03:57 open-webui  | INFO:     127.0.0.1:52180 - "GET /health HTTP/1.1" 200 OK

Screenshots (if applicable):

Installation Method

docker-compose

services:
  ollama:
    volumes:
      - ollama:/root/.ollama
    container_name: ollama
    pull_policy: always
    tty: true
    restart: unless-stopped
    image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}

  open-webui:
    build:
      context: .
      args:
        OLLAMA_BASE_URL: '/ollama'
      dockerfile: Dockerfile
    image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-dev}
    container_name: open-webui
    volumes:
      - open-webui:/app/backend/data
    depends_on:
      - ollama
    ports:
      - ${OPEN_WEBUI_PORT-3000}:8080
    environment:
      - 'OLLAMA_BASE_URL=http://ollama:11434'
      - 'WEBUI_SECRET_KEY='
      - 'OPENAI_API_BASE_URL=${OPENAI_API_BASE_URL}'
      - 'OPENAI_API_KEY=${OPENAI_API_KEY}'
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped

volumes:
  ollama: {}
  open-webui: {}

Additional Information

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @thienedits on GitHub (Jun 13, 2024). # Bug Report ## Description getting the error `404 Client Error: Not Found for url: https://api.openai.com/v1/embeddings/embeddings` when uploading a file **Bug Summary:** **Steps to Reproduce:** **Expected Behavior:** **Actual Behavior:** ## Environment - **Open WebUI Version: 0.3.4 dev branch - **Ollama (if applicable): [0.1.43](https://hub.docker.com/layers/ollama/ollama/0.1.43/images/sha256-b2adbacb1c3fb5b6a598538195100f380d0b64e84655ca003577ad4a10a15dca?context=explore) - **Operating System: macOS 14.5 - **Browser (if applicable): Chrome Version 126.0.6478.56 (Official Build) (arm64) ## Reproduction Details **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [X] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** **Docker Container Logs:** ``` 2024-06-12 17:59:51 open-webui | 404 Client Error: Not Found for url: https://api.openai.com/v1/embeddings/embeddings 2024-06-12 17:59:51 open-webui | ERROR:apps.rag.main:'NoneType' object is not iterable 2024-06-12 17:59:51 open-webui | Traceback (most recent call last): 2024-06-12 17:59:51 open-webui | File "/app/backend/apps/rag/main.py", line 934, in store_docs_in_vector_db 2024-06-12 17:59:51 open-webui | embeddings = embedding_func(embedding_texts) 2024-06-12 17:59:51 open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 17:59:51 open-webui | File "/app/backend/apps/rag/utils.py", line 236, in <lambda> 2024-06-12 17:59:51 open-webui | return lambda query: generate_multiple(query, func) 2024-06-12 17:59:51 open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-06-12 17:59:51 open-webui | File "/app/backend/apps/rag/utils.py", line 229, in generate_multiple 2024-06-12 17:59:51 open-webui | embeddings.extend(f(query[i : i + batch_size])) 2024-06-12 17:59:51 open-webui | TypeError: 'NoneType' object is not iterable 2024-06-12 17:59:51 open-webui | INFO: 192.168.65.1:41540 - "POST /rag/api/v1/doc HTTP/1.1" 200 OK 2024-06-12 17:59:57 open-webui | INFO: 127.0.0.1:33998 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:00:27 open-webui | INFO: 127.0.0.1:47498 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:00:57 open-webui | INFO: 127.0.0.1:42250 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:01:27 open-webui | INFO: 127.0.0.1:33964 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:01:57 open-webui | INFO: 127.0.0.1:48594 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:02:27 open-webui | INFO: 127.0.0.1:56040 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:02:57 open-webui | INFO: 127.0.0.1:35130 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:03:27 open-webui | INFO: 127.0.0.1:39138 - "GET /health HTTP/1.1" 200 OK 2024-06-12 18:03:57 open-webui | INFO: 127.0.0.1:52180 - "GET /health HTTP/1.1" 200 OK ``` **Screenshots (if applicable):** ## Installation Method docker-compose ``` services: ollama: volumes: - ollama:/root/.ollama container_name: ollama pull_policy: always tty: true restart: unless-stopped image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest} open-webui: build: context: . args: OLLAMA_BASE_URL: '/ollama' dockerfile: Dockerfile image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-dev} container_name: open-webui volumes: - open-webui:/app/backend/data depends_on: - ollama ports: - ${OPEN_WEBUI_PORT-3000}:8080 environment: - 'OLLAMA_BASE_URL=http://ollama:11434' - 'WEBUI_SECRET_KEY=' - 'OPENAI_API_BASE_URL=${OPENAI_API_BASE_URL}' - 'OPENAI_API_KEY=${OPENAI_API_KEY}' extra_hosts: - host.docker.internal:host-gateway restart: unless-stopped volumes: ollama: {} open-webui: {} ``` ## Additional Information ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1239