Skip to content

Commit 3173d2d

Browse files
wanhakimchinyixiang
authored andcommitted
update studio fe table UI and updated studio be according to the dataprep refactor (#32)
* update worflows table Signed-off-by: Chin, Yi Xiang <[email protected]> * update workflows table namings and moved screenshot from sample-workflows to assets Signed-off-by: wwanarif <[email protected]> * update for latest dataprep refactor Signed-off-by: wwanarif <[email protected]> * update e2e CI workflow Signed-off-by: wwanarif <[email protected]> * update dataprep image name Signed-off-by: wwanarif <[email protected]> * update studio-fe dockerfile Signed-off-by: wwanarif <[email protected]> --------- Signed-off-by: Chin, Yi Xiang <[email protected]> Signed-off-by: wwanarif <[email protected]> Co-authored-by: Chin, Yi Xiang <[email protected]>
1 parent 6238afb commit 3173d2d

File tree

13 files changed

+194
-130
lines changed

13 files changed

+194
-130
lines changed

.github/workflows/_e2e-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
fi
5454
sleep 5
5555
sudo apt install ansible -y
56+
sed -i 's/value: ${TAG}/value: latest/' manifests/studio-manifest.yaml
5657
ansible-playbook genai-studio.yml -e "container_registry=${OPEA_IMAGE_REPO}opea" -e "container_tag=${{ inputs.tag }}" -e "mysql_host=$(hostname -I | awk '{print $1}')"
5758
sleep 5
5859
kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=300s --field-selector=status.phase!=Succeeded

app-frontend/react/src/components/Conversation/DataSource.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function DataSource({ opened, onClose }: Props) {
3636
try {
3737
setTimeout(async () => {
3838
const response = await client.post(
39-
`${DATA_PREP_URL}/get_file`,
39+
`${DATA_PREP_URL}/get`,
4040
{}, // Request body (if needed, replace the empty object with actual data)
4141
{
4242
headers: {
@@ -55,7 +55,7 @@ export default function DataSource({ opened, onClose }: Props) {
5555
const deleteFile = async (id: string) => {
5656
try {
5757
await client.post(
58-
`${DATA_PREP_URL}/delete_file`,
58+
`${DATA_PREP_URL}/delete`,
5959
{ file_path: id }, // Request body (if needed, replace the empty object with actual data)
6060
{
6161
headers: {

app-frontend/react/src/redux/Conversation/ConversationSlice.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const submitDataSourceURL = createAsyncThunkWrapper(
114114
try {
115115
const body = new FormData();
116116
body.append("link_list", JSON.stringify(link_list));
117-
const response = await client.post(DATA_PREP_URL, body);
117+
const response = await client.post(`${DATA_PREP_URL}/ingest`, body);
118118
return response.data;
119119
} catch (error) {
120120
console.log ("error", error);
@@ -132,7 +132,7 @@ export const uploadFile = createAsyncThunkWrapper("conversation/uploadFile", asy
132132
message: "uploading File",
133133
loading: true,
134134
});
135-
const response = await client.post(DATA_PREP_URL, body);
135+
const response = await client.post(`${DATA_PREP_URL}/ingest`, body);
136136
return response.data;
137137
} catch (error) {
138138
throw error;

setup-scripts/setup-genai-studio/manifests/studio-manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ spec:
326326
- name: APP_BACKEND_IMAGE
327327
value: ${REGISTRY}/app-backend:${TAG}
328328
- name: REGISTRY
329-
value: opea
329+
value: ${REGISTRY}
330330
- name: TAG
331-
value: latest
331+
value: ${TAG}
332332
- name: SBX_HTTP_PROXY
333333
value: ${HTTP_PROXY}
334334
- name: SBX_NO_PROXY

setup-scripts/setup-genai-studio/playbooks/deploy-studio.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
MYSQL_HOST: "{{ mysql_host }}"
7878

7979
- name: Wait for all pods to be ready in studio namespace
80-
shell: kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=180s
80+
shell: kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=300s
8181
register: pod_ready_check
8282
failed_when: pod_ready_check.rc != 0
8383
changed_when: false
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
"{{endpoint}}":
2-
image: ${REGISTRY}/dataprep-redis:${TAG}
2+
image: ${REGISTRY}/dataprep:${TAG}
33
container_name: "{{endpoint}}"
44
depends_on:
55
"{{redis_vector_store_endpoint}}":
66
condition: service_started
77
"{{tei_endpoint}}":
88
condition: service_healthy
99
ports:
10-
- 6007:6007
10+
- 6007:5000
1111
environment:
1212
no_proxy: ${no_proxy}
1313
http_proxy: ${http_proxy}
1414
https_proxy: ${https_proxy}
1515
REDIS_URL: "redis://${public_host_ip}:{{redis_vector_store_port}}"
1616
REDIS_HOST: "${public_host_ip}"
1717
INDEX_NAME: "rag-redis"
18-
TEI_ENDPOINT: "http://${public_host_ip}:{{tei_port}}"
18+
TEI_EMBEDDING_ENDPOINT: "http://${public_host_ip}:{{tei_port}}"
19+
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_REDIS"
1920
HUGGINGFACEHUB_API_TOKEN: "{{tei_huggingFaceToken}}"

studio-backend/app/templates/microsvc-manifests/data-prep.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ metadata:
99
name: config-{endpoint}
1010
data:
1111
HEALTHCHECK_ENDPOINT: "{tei_endpoint}"
12-
TEI_ENDPOINT: "http://{tei_endpoint}"
13-
EMBED_MODEL: ""
12+
TEI_EMBEDDING_ENDPOINT: "http://{tei_endpoint}"
13+
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_REDIS"
1414
REDIS_URL: "redis://{redis_vector_store_endpoint}:{redis_vector_store_port}"
1515
INDEX_NAME: "rag-redis"
1616
KEY_INDEX_NAME: "file-keys"
@@ -34,7 +34,7 @@ spec:
3434
type: ClusterIP
3535
ports:
3636
- port: 6007
37-
targetPort: 6007
37+
targetPort: 5000
3838
protocol: TCP
3939
name: "{endpoint}"
4040
selector:
@@ -84,11 +84,11 @@ spec:
8484
runAsUser: 1000
8585
seccompProfile:
8686
type: RuntimeDefault
87-
image: "${REGISTRY}/dataprep-redis:${TAG}"
87+
image: "${REGISTRY}/dataprep:${TAG}"
8888
imagePullPolicy: Always
8989
ports:
9090
- name: data-prep
91-
containerPort: 6007
91+
containerPort: 5000
9292
protocol: TCP
9393
volumeMounts:
9494
- mountPath: /tmp

studio-backend/tests/exporter-groundtruth/gt_app-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ services:
9595
HF_HUB_ENABLE_HF_TRANSFER: 0
9696
restart: unless-stopped
9797
prepare-doc-redis-prep-0:
98-
image: opea/dataprep-redis:latest
98+
image: opea/dataprep:latest
9999
container_name: prepare-doc-redis-prep-0
100100
depends_on:
101101
- redis-vector-store-0

studio-backend/tests/exporter-groundtruth/gt_app-manifest-with-nginx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ spec:
778778
runAsUser: 1000
779779
seccompProfile:
780780
type: RuntimeDefault
781-
image: opea/dataprep-redis:latest
781+
image: opea/dataprep:latest
782782
imagePullPolicy: Always
783783
ports:
784784
- name: data-prep

0 commit comments

Comments
 (0)