Skip to content
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
7 changes: 3 additions & 4 deletions deployment/helm/label-studio/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "label-studio.name" -}}
{{- default .Chart.name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- default .Values.nameOverride .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand All @@ -12,7 +12,7 @@ Create a default fully qualified app name.
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.name .Values.nameOverride -}}
{{- $name := default .Values.nameOverride .Chart.Name -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
Expand All @@ -21,6 +21,5 @@ Create a default fully qualified app name.
Create chart name and version as used by the chart label.
*/}}
{{- define "label-studio.chart" -}}
{{- printf "%s-%s" .Chart.name .Chart.version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

10 changes: 6 additions & 4 deletions deployment/helm/label-studio/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Default values for label-studio Helm chart.
# This mirrors the configuration from deployment/docker/label-studio/docker-compose.yml
fullnameOverride: label-studio

replicaCount: 1

Expand All @@ -24,9 +25,9 @@ postgres:
size: 10Gi

service:
type: ClusterIP
type: NodePort
port: 8000
nodePort: null
nodePort: 30001

# Corresponds to docker-compose port mapping 30001:8000
ingress:
Expand Down Expand Up @@ -54,7 +55,7 @@ env:
POSTGRE_USER: "postgres"
POSTGRE_PASSWORD: ""
POSTGRE_PORT: 5432
POSTGRE_HOST: "db"
POSTGRE_HOST: "label-studio-postgres"
LABEL_STUDIO_HOST: "" # can be overridden
LOCAL_FILES_SERVING_ENABLED: "true"
LOCAL_FILES_DOCUMENT_ROOT: "/label-studio/local"
Expand All @@ -75,5 +76,6 @@ persistence:
# If not set and persistence.enabled=true, a PVC will be created automatically.
datasetVolume:
enabled: true
claimName: "" # if empty, uses same PVC as persistence or creates a dedicated one
claimName: datamate-dataset-pvc # if empty, uses same PVC as persistence or creates a dedicated one


15 changes: 9 additions & 6 deletions frontend/src/pages/SynthesisTask/CreateTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ export default function SynthesisTaskCreate() {
}

// 构造后端要求的参数格式
const payload = {
name: values.name || form.getFieldValue("name"), // 必选,确保传递
description: values.description ?? "", // 可选,始终传递
const payload: Record<string, unknown> = {
name: values.name || form.getFieldValue("name"),
model_id: selectedModel,
source_file_id: selectedFiles,
text_split_config: {
Expand All @@ -161,10 +160,14 @@ export default function SynthesisTaskCreate() {
synthesis_type: taskType === "qa" ? "QA" : "COT",
};

// 只有在有真实内容时携带 description,避免强制传空字符串
const desc = values.description ?? form.getFieldValue("description");
if (typeof desc === "string" && desc.trim().length > 0) {
payload.description = desc.trim();
}

setSubmitting(true);
const res = (await createSynthesisTaskUsingPost(
payload as unknown as Record<string, unknown>
)) as CreateTaskApiResponse;
const res = (await createSynthesisTaskUsingPost(payload)) as CreateTaskApiResponse;

const ok =
res?.success === true ||
Expand Down
Loading