diff --git a/ui/app/components/Project/Create/Form.vue b/ui/app/components/Project/Create/Form.vue index 4f1ab3c..807de75 100644 --- a/ui/app/components/Project/Create/Form.vue +++ b/ui/app/components/Project/Create/Form.vue @@ -64,17 +64,19 @@ const nextStep = () => { }), vector_dimension: state.indexing?.vector_dimension || [], indexing_algorithm: state.indexing?.indexing_algorithm || '', - embedding: state.indexing?.embedding?.map((pc) => { + embedding: state?.indexing?.embedding.filter((pc) => { + return pc?.model && pc?.service && pc?.label + })? state.indexing?.embedding?.map((pc) => { return { - model: pc?.value, + model: pc?.model, service: pc?.service, label: pc?.label } - }) || [{ + }) : [{ "model": "", "service": "", "label": "" - }] + }] }, retrieval: { n_shot_prompts: state.retrieval?.n_shot_prompts, diff --git a/ui/app/components/Project/Experiment/List.vue b/ui/app/components/Project/Experiment/List.vue index 4ec4f61..ecc925e 100644 --- a/ui/app/components/Project/Experiment/List.vue +++ b/ui/app/components/Project/Experiment/List.vue @@ -220,9 +220,9 @@ const columns = ref[]>([ return a - b; }, cell: ({ row }) => { - // if(!row.original.config.knowledge_base){ - // return "NA" - // } + if(!row.original.config.knowledge_base){ + return "NA" + } if ("faithfulness_score" in row.original.eval_metrics) { return row.original.eval_metrics.faithfulness_score ? parseFloat(row.original.eval_metrics.faithfulness_score.toString()).toFixed(2) : "NA" } @@ -283,6 +283,9 @@ const columns = ref[]>([ return a - b; }, cell: ({ row }) => { + if(!row.original.config.knowledge_base){ + return "NA" + } if ("context_precision_score" in row.original.eval_metrics) { return row.original.eval_metrics.context_precision_score ? parseFloat(row.original.eval_metrics.context_precision_score.toString()).toFixed(2) : "NA" } diff --git a/ui/app/composables/shared.ts b/ui/app/composables/shared.ts index 281e7a9..4448dc9 100644 --- a/ui/app/composables/shared.ts +++ b/ui/app/composables/shared.ts @@ -732,7 +732,7 @@ export const useProjectUploadConfig = () => { ...(config.indexing?.chunking_strategy.includes('hierarchical') && config.indexing?.hierarchical_parent_chunk_size.length > 0 ? { hierarchical_parent_chunk_size: config.indexing?.hierarchical_parent_chunk_size} : {}), ...(config.indexing?.chunking_strategy.includes('hierarchical') && config.indexing?.hierarchical_child_chunk_size.length > 0 ? { hierarchical_child_chunk_size: config.indexing?.hierarchical_child_chunk_size} : {}), ...(config.indexing?.chunking_strategy.includes('hierarchical') && config.indexing?.hierarchical_chunk_overlap_percentage.length > 0 ? { hierarchical_chunk_overlap_percentage: config.indexing?.hierarchical_chunk_overlap_percentage} : {}), - embedding: config.indexing?.embedding?.map((pc: any) => { + embedding: config.indexing.embedding.length === 1 && !config.indexing.embedding[0].model ? [{"model": '', "service": '', "label": ''}] : config.indexing.embedding.map((pc: any) => { return useGetModelData("indexing", pc.model); }), },