opea-project / GenAIExamples

Generative AI Examples is a collection of GenAI examples such as ChatQnA, Copilot, which illustrate the pipeline capabilities of the Open Platform for Enterprise AI (OPEA) project.
https://opea.dev
Apache License 2.0
172 stars 81 forks source link

ChatQnA: Issue with UI #281

Closed wsfowler closed 2 weeks ago

wsfowler commented 2 weeks ago

Testing the Xeon version of ChatQnA using the ChatQnA/tests/test_chatqna_on_xeon.sh and all of the services pass except for the UI:

Mega service start minimal duration is 0s, maximal duration(including docker image build) is 0s
[ tei-embedding ] HTTP status is 200. Checking content...
[ tei-embedding ] Content is as expected.
[ embedding ] HTTP status is 200. Checking content...
[ embedding ] Content is as expected.
[ retrieval ] HTTP status is 200. Checking content...
[ retrieval ] Content is as expected.
[ tei-rerank ] HTTP status is 200. Checking content...
[ tei-rerank ] Content is as expected.
[ rerank ] HTTP status is 200. Checking content...
[ rerank ] Content is as expected.
[ tgi-llm ] HTTP status is 200. Checking content...
[ tgi-llm ] Content is as expected.
[ llm ] HTTP status is 200. Checking content...
[ llm ] Content is as expected.
[ mega-chatqna ] HTTP status is 200. Checking content...
[ mega-chatqna ] Content is as expected.
Running 3 tests using 3 workers
  1) [webkit] › chatQnA.spec.ts:67:2 › Upload file › should upload a file ──────────────────────────

    Error: expect(received).toContain(expected) // indexOf

    Expected substring: "Uploaded successfully"
    Received string:    "Uploaded failed ×"

      27 |      const notification = await page.waitForSelector(".notification");
      28 |      const notificationText = await notification.textContent();
    > 29 |      expect(notificationText).toContain(expectedText);
         |                               ^
      30 | }
      31 |
      32 | // Helper function: Enter message to chat

        at checkNotificationText (/root/GenAIExamples/ChatQnA/docker/ui/svelte/tests/chatQnA.spec.ts:29:27)
        at uploadFile (/root/GenAIExamples/ChatQnA/docker/ui/svelte/tests/chatQnA.spec.ts:45:2)
        at /root/GenAIExamples/ChatQnA/docker/ui/svelte/tests/chatQnA.spec.ts:71:3

  1 failed
    [webkit] › chatQnA.spec.ts:67:2 › Upload file › should upload a file ───────────────────────────
  2 passed (24.4s)

The UI is showing up, but it isn't responding.

image

I've looked through the container logs and no errors are standing out.

xiguiw commented 2 weeks ago

Hi @wsfowler

Welcome to GenAIExamples!

I would like to know in such environment did you test ChatQnA and UI.

  1. How did you set the host_ip of ChatQnA environment? Especially the BACKEND_SERVICE_ENDPOINT. UI server depends on the environment.

  2. Where do you run the ChatQnA/tests/test_chatqna_on_xeon.sh, from Xeon Console?

  3. In which machine did you start the browser? Could this machine (start the machine) access the meage service, i.e BACKEND_SERVICE_ENDPOINT?

Thanks!

wsfowler commented 2 weeks ago

Hi @wsfowler

Welcome to GenAIExamples!

I would like to know in such environment did you test ChatQnA and UI.

  • In AWS using the m7i.16xlarge instance type.
  1. How did you set the host_ip of ChatQnA environment? Especially the BACKEND_SERVICE_ENDPOINT. UI server depends on the environment.
  1. Where do you run the ChatQnA/tests/test_chatqna_on_xeon.sh, from Xeon Console?
  1. In which machine did you start the browser? Could this machine (start the machine) access the meage service, i.e BACKEND_SERVICE_ENDPOINT?

Thanks!

wsfowler commented 2 weeks ago

@xiguiw Here is what I get when I access the BACKEND_SERVICE_ENDPOINT:

image

Here are the logs from chatqna-xeon-backend-server container:

/usr/local/lib/python3.11/site-packages/pydantic/_internal/_fields.py:160: UserWarning: Field "model_name_or_path" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
[2024-06-13 13:42:34,894] [    INFO] - CORS is enabled.
[2024-06-13 13:42:34,894] [    INFO] - Setting up HTTP server
[2024-06-13 13:42:34,895] [    INFO] - Uvicorn server setup on port 8888
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8888 (Press CTRL+C to quit)
[2024-06-13 13:42:34,905] [    INFO] - HTTP server setup successful
200
200
200
INFO:     172.31.82.151:41784 - "POST /v1/chatqna HTTP/1.1" 200 OK
200
200
200
INFO:     172.31.82.151:37016 - "POST /v1/chatqna HTTP/1.1" 200 OK
INFO:     192.55.54.43:11710 - "GET /v1/chatqna HTTP/1.1" 405 Method Not Allowed
INFO:     192.55.54.43:11710 - "GET /favicon.ico HTTP/1.1" 404 Not Found
wsfowler commented 2 weeks ago

The script was picking up the local IP to use for the endpoints, but it should've been using the public IP. Closing this issue, but there should be some note or maybe architecture diagram that discusses this.