Skip to content

update studio fe table UI and updated studio be according to the dataprep refactor #32

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

Merged
merged 6 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/_e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
fi
sleep 5
sudo apt install ansible -y
sed -i 's/value: ${TAG}/value: latest/' manifests/studio-manifest.yaml
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}')"
sleep 5
kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=300s --field-selector=status.phase!=Succeeded
Expand Down
4 changes: 2 additions & 2 deletions app-frontend/react/src/components/Conversation/DataSource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function DataSource({ opened, onClose }: Props) {
try {
setTimeout(async () => {
const response = await client.post(
`${DATA_PREP_URL}/get_file`,
`${DATA_PREP_URL}/get`,
{}, // Request body (if needed, replace the empty object with actual data)
{
headers: {
Expand All @@ -55,7 +55,7 @@ export default function DataSource({ opened, onClose }: Props) {
const deleteFile = async (id: string) => {
try {
await client.post(
`${DATA_PREP_URL}/delete_file`,
`${DATA_PREP_URL}/delete`,
{ file_path: id }, // Request body (if needed, replace the empty object with actual data)
{
headers: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const submitDataSourceURL = createAsyncThunkWrapper(
try {
const body = new FormData();
body.append("link_list", JSON.stringify(link_list));
const response = await client.post(DATA_PREP_URL, body);
const response = await client.post(`${DATA_PREP_URL}/ingest`, body);
return response.data;
} catch (error) {
console.log ("error", error);
Expand All @@ -132,7 +132,7 @@ export const uploadFile = createAsyncThunkWrapper("conversation/uploadFile", asy
message: "uploading File",
loading: true,
});
const response = await client.post(DATA_PREP_URL, body);
const response = await client.post(`${DATA_PREP_URL}/ingest`, body);
return response.data;
} catch (error) {
throw error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ spec:
- name: APP_BACKEND_IMAGE
value: ${REGISTRY}/app-backend:${TAG}
- name: REGISTRY
value: opea
value: ${REGISTRY}
- name: TAG
value: latest
value: ${TAG}
- name: SBX_HTTP_PROXY
value: ${HTTP_PROXY}
- name: SBX_NO_PROXY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
MYSQL_HOST: "{{ mysql_host }}"

- name: Wait for all pods to be ready in studio namespace
shell: kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=180s
shell: kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=300s
register: pod_ready_check
failed_when: pod_ready_check.rc != 0
changed_when: false
7 changes: 4 additions & 3 deletions studio-backend/app/templates/microsvc-composes/data-prep.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"{{endpoint}}":
image: ${REGISTRY}/dataprep-redis:${TAG}
image: ${REGISTRY}/dataprep:${TAG}
container_name: "{{endpoint}}"
depends_on:
"{{redis_vector_store_endpoint}}":
condition: service_started
"{{tei_endpoint}}":
condition: service_healthy
ports:
- 6007:6007
- 6007:5000
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
REDIS_URL: "redis://${public_host_ip}:{{redis_vector_store_port}}"
REDIS_HOST: "${public_host_ip}"
INDEX_NAME: "rag-redis"
TEI_ENDPOINT: "http://${public_host_ip}:{{tei_port}}"
TEI_EMBEDDING_ENDPOINT: "http://${public_host_ip}:{{tei_port}}"
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_REDIS"
HUGGINGFACEHUB_API_TOKEN: "{{tei_huggingFaceToken}}"
10 changes: 5 additions & 5 deletions studio-backend/app/templates/microsvc-manifests/data-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ metadata:
name: config-{endpoint}
data:
HEALTHCHECK_ENDPOINT: "{tei_endpoint}"
TEI_ENDPOINT: "http://{tei_endpoint}"
EMBED_MODEL: ""
TEI_EMBEDDING_ENDPOINT: "http://{tei_endpoint}"
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_REDIS"
REDIS_URL: "redis://{redis_vector_store_endpoint}:{redis_vector_store_port}"
INDEX_NAME: "rag-redis"
KEY_INDEX_NAME: "file-keys"
Expand All @@ -34,7 +34,7 @@ spec:
type: ClusterIP
ports:
- port: 6007
targetPort: 6007
targetPort: 5000
protocol: TCP
name: "{endpoint}"
selector:
Expand Down Expand Up @@ -84,11 +84,11 @@ spec:
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
image: "${REGISTRY}/dataprep-redis:${TAG}"
image: "${REGISTRY}/dataprep:${TAG}"
imagePullPolicy: Always
ports:
- name: data-prep
containerPort: 6007
containerPort: 5000
protocol: TCP
volumeMounts:
- mountPath: /tmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ services:
HF_HUB_ENABLE_HF_TRANSFER: 0
restart: unless-stopped
prepare-doc-redis-prep-0:
image: opea/dataprep-redis:latest
image: opea/dataprep:latest
container_name: prepare-doc-redis-prep-0
depends_on:
- redis-vector-store-0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ spec:
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
image: opea/dataprep-redis:latest
image: opea/dataprep:latest
imagePullPolicy: Always
ports:
- name: data-prep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ spec:
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
image: opea/dataprep-redis:latest
image: opea/dataprep:latest
imagePullPolicy: Always
ports:
- name: data-prep
Expand Down
5 changes: 1 addition & 4 deletions studio-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM node:20-alpine

# Install necessary packages
RUN apk add --no-cache gcompat python3 make g++ \
RUN apk add --no-cache gcompat python3 make g++ git \
# Needed for pdfjs-dist
build-base cairo-dev pango-dev \
# Install Chromium
chromium && \
# Install PNPM globally
npm install -g pnpm@9.12.3

# Install git
RUN apk add --no-cache git

# Debug step to verify git installation
RUN git --version

Expand Down
Loading
Loading