-
Notifications
You must be signed in to change notification settings - Fork 192
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
chatqna ui - nginx proxy_pass #616
base: main
Are you sure you want to change the base?
Conversation
7805636
to
0c2d098
Compare
ChatQnA/docker/ui/react/nginx.conf
Outdated
|
||
location ~* \.(gif|jpe?g|png|webp|ico|svg|css|js|mp4|woff2)$ { | ||
expires 1d; | ||
} | ||
} | ||
|
||
location "/v1/chatqna" { | ||
proxy_pass $CHAT_BASE_URL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the environment variable correct ? compose.yaml is setting APP_BACKEND_SERVICE_ENDPOINT
and APP_DATA_PREP_SERVICE_URL
as env variables according to https://github.com/opea-project/GenAIExamples/blob/main/ChatQnA/docker/xeon/README.md?plain=1#L403
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaswanth8888 thanks for pointing this out.
In the other UI the same variable is given the name CHAT_BASE_URL
.
I think I would change this README (and the one for Gaudi and Gpu) to use the same env var name.
APP_BACKEND_SERVICE_ENDPOINT
->CHAT_BASE_URL
I don't see any point in having 2 names for the same thing.
I would do the same thing for
APP_DATA_PREP_SERVICE_URL
->UPLOAD_FILE_BASE_URL
0c2d098
to
58caa48
Compare
@SeanCondon with this approach for every api that would be integrated in the UI we have to update nginx.conf file. will this don't be a overhead when it comes to productivity suite in which all the examples would be part of single UI. |
Do you have a pointer to the productivity suite? |
e5d388d
to
30f602d
Compare
30f602d
to
5ef27dd
Compare
@SeanCondon #592 please have look at this PR |
@SeanCondon, CHAT_BASE_URL = 'http://backend_address:8888/v1/chatqna' UPLOAD_FILE_BASE_URL = 'http://backend_address:6007/v1/dataprep' GET_FILE = 'http://backend_address:6007/v1/dataprep/get_file' DELETE_FILE = 'http://backend_address:6007/v1/dataprep/delete_file' |
5ef27dd
to
9d300ec
Compare
I have looked at this UI and I think it needs the same treatment of having a proxy. To be honest I have tried to submit this PR and did not get any kind of positive feedback. I do not have time to keep chasing the CI while I wait for some constructive feedback. |
748ba55
to
6ff0e67
Compare
@lvliang-intel please see my latest changes to tackle the Svelte UI |
If this is target v1.0, we need to merge by today. |
c7ed49c
to
0e475e2
Compare
Signed-off-by: SeanCondon <[email protected]>
Signed-off-by: SeanCondon <[email protected]>
Signed-off-by: SeanCondon <[email protected]>
Signed-off-by: SeanCondon <[email protected]>
Signed-off-by: SeanCondon <[email protected]>
Signed-off-by: SeanCondon <[email protected]>
0e475e2
to
d375b34
Compare
Do we still need this PR? @SeanCondon |
Description
This adds a proxy_pass inside the nginx.conf of the
chatqna-conversation-ui
. This has the effect of avoiding CORS errors when the Javascript in the browser calls the backend service. CORS error occur when the javascript makes a call to a backend host:port not equal to where it was loaded from.The effect is that the javascript now calls
http://host:port/v1/chatqna
which the nginx service in the pod will remap tohttp://chatqna:8888/v1/chatqna
inside the cluster.This was undertaken on the suggestion of @Ruoyu-y in this PR 305 on GenAIInfra
This is an additional fix for #493 and #528
Issues
n/a
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
List the newly introduced 3rd party dependency if exists.
Tests
Load the services with docker compose according to the instructions in README.md in
docker/xeon