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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { type ComponentType } from 'react';

import { type prompt } from '@cozeloop/api-schema/prompt';
import { type Model } from '@cozeloop/api-schema/llm-manage';
import { type RuntimeParam } from '@cozeloop/api-schema/evaluation';
export interface EvaluateTargetPromptDynamicParamsProps {
promptID?: string;
Expand All @@ -9,6 +10,7 @@ export interface EvaluateTargetPromptDynamicParamsProps {
disabled?: boolean;
value?: RuntimeParam;
onChange?: (val?: RuntimeParam) => void;
onModelChange?: (model?: Model) => void;
}

export interface EvaluateExperimentsAdapters {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import { Input } from '@coze-arch/coze-design';

import { type DatasetItemProps } from '../../type';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from 'react';

import cn from 'classnames';
import { I18n } from '@cozeloop/i18n-adapter';
import { CodeEditor, handleCopy } from '@cozeloop/components';
import { IconCozCopy } from '@coze-arch/coze-design/icons';
import { Button, SemiSelect } from '@coze-arch/coze-design';
Expand Down Expand Up @@ -47,7 +48,7 @@ export const CodeDatasetItem = ({
color="primary"
size="small"
>
{I18n.t('copy')}
{I18n.t('evaluate_copy')}
</Button>
</div>
<div className="flex-1 rounded-[6px] py-3 bg-[#1e1e1e] overflow-hidden">
Expand Down
20 changes: 6 additions & 14 deletions frontend/packages/cozeloop/evaluate-components/src/const/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@ export const ErrorTypeMap = {
[ItemErrorType.InternalError]: I18n.t('system_error'),
[ItemErrorType.IllegalContent]: I18n.t('contains_illegal_content'),
[ItemErrorType.MissingRequiredField]: I18n.t('missing_required_field'),
[ItemErrorType.ExceedMaxNestedDepth]: I18n.t(
'data_engine_data_nesting_exceeds_limit',
),
[ItemErrorType.TransformItemFailed]: I18n.t(
'data_engine_data_conversion_failed',
),
[ItemErrorType.ExceedMaxImageCount]: I18n.t(
'data_engine_exceed_max_image_count',
),
[ItemErrorType.ExceedMaxImageSize]: I18n.t(
'data_engine_exceed_max_image_size',
),
[ItemErrorType.GetImageFailed]: I18n.t('data_engine_get_image_failed'),
[ItemErrorType.IllegalExtension]: I18n.t('data_engine_illegal_extension'),
[ItemErrorType.ExceedMaxNestedDepth]: I18n.t('data_nesting_exceeds_limit'),
[ItemErrorType.TransformItemFailed]: I18n.t('data_conversion_failed'),
[ItemErrorType.ExceedMaxImageCount]: I18n.t('exceed_max_image_count'),
[ItemErrorType.ExceedMaxImageSize]: I18n.t('exceed_max_image_size'),
[ItemErrorType.GetImageFailed]: I18n.t('get_image_failed'),
[ItemErrorType.IllegalExtension]: I18n.t('illegal_extension'),
[ItemErrorType.UploadImageFailed]: I18n.t(
'cozeloop_open_evaluate_image_upload_failed',
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const ExportMenu = (props: ExportMenuProps) => {
</Dropdown.Item>
</TooltipWhenDisabled>
<Dropdown.Title className="!pl-2">
{I18n.t('export_records')}
{I18n.t('evaluate_export_records')}
</Dropdown.Title>
<Dropdown.Item className="!pl-2" onClick={onViewDownloadFiles}>
{I18n.t('view_and_download_files')}
Expand All @@ -110,7 +110,7 @@ const ExportMenu = (props: ExportMenuProps) => {
}
>
<Button color="primary" iconPosition="right" icon={<IconCozArrowDown />}>
{I18n.t('export')}
{I18n.t('evaluate_export')}
</Button>
</Dropdown>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface ExportTableModalProps {

const ExportRefreshComp = ({ onRefresh }: { onRefresh: () => void }) => (
<div className="flex items-center gap-[6px]">
<span>{I18n.t('export_records')}</span>
<span>{I18n.t('evaluate_export_records')}</span>
<Button
color="secondary"
iconPosition="left"
Expand All @@ -39,7 +39,7 @@ const ExportRefreshComp = ({ onRefresh }: { onRefresh: () => void }) => (
}}
>
<span className="text-[var(--coz-fg-secondary)]">
{I18n.t('task_refresh')}
{I18n.t('refresh')}
</span>
</Button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function getExportExperimentColumns() {
},
{
title: I18n.t('completion_time'),
value: I18n.t('data_annotate_end_time'),
value: I18n.t('completion_time'),
dataIndex: 'end_time',
key: 'end_time',
width: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export default function GroupSelect(props: GroupSelectProps) {
))}
{filteredOptionGroups.length === 0 && searchText && (
<div className="text-center py-4 text-gray-500">
{I18n.t('no_matching_option')}
{I18n.t('no_matching_options_found')}
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type FC } from 'react';

import { I18n } from '@cozeloop/i18n-adapter';
import {
EqualItem,
ReadonlyItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export const useExptExportModal = () => {

// 导出记录的表格列配置
const exportRecordColumn = {
title: I18n.t('export_records'),
title: I18n.t('evaluate_export_records'),
key: 'export_record',
width: 80,
render: (_: unknown, record: ExptResultExportRecord) => (
<span
className="cursor-pointer text-primary hover:text-primary-hover"
onClick={() => onExportRecordClick(record)}
>
{I18n.t('export_records')}
{I18n.t('evaluate_export_records')}
</span>
),
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import { type Model } from '@cozeloop/api-schema/llm-manage';
import { ContentType, type Message } from '@cozeloop/api-schema/evaluation';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from 'react';

import { EVENT_NAMES, sendEvent } from '@cozeloop/tea-adapter';
import { I18n } from '@cozeloop/i18n-adapter';
import { ExptStatus, type Experiment } from '@cozeloop/api-schema/evaluation';
import { IconCozPlus } from '@coze-arch/coze-design/icons';
import { Button } from '@coze-arch/coze-design';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import { ResizeSidesheet, IDRender } from '@cozeloop/components';
import {
type Experiment,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import { Button, Popover } from '@coze-arch/coze-design';

export const SkipButton = (props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import {
type EvalTarget,
type RuntimeParam,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { get } from 'lodash-es';
import { type Datum } from '@visactor/vchart/esm/typings';
import { I18n } from '@cozeloop/i18n-adapter';
import { type CustomTooltipProps } from '@cozeloop/evaluate-components';
import {
type OptionDistributionItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const ExperimentDescription = ({
{target_runtime_param?.json_value &&
target_runtime_param.json_value !== '{}' ? (
<DescriptionItem
label={I18n.t('parameter_injection')}
label={I18n.t('evaluate_parameter_injection')}
content={
<DynamicParams
evalTarget={eval_target}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from 'react';

import { useRequest } from 'ahooks';
import { I18n } from '@cozeloop/i18n-adapter';
import { PageLoading } from '@cozeloop/components';
import { type ColumnAnnotation } from '@cozeloop/api-schema/evaluation';
import { type tag } from '@cozeloop/api-schema/data';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ export function AnnotateItemCard({
{I18n.t('detail')}
</Typography.Text>
</Tooltip>
<Tooltip content={I18n.t('evaluate_delete_tag')} theme="dark">
<Tooltip content={I18n.t('delete_tag')} theme="dark">
<Typography.Text
link
onClick={() => {
Modal.warning({
title: I18n.t('evaluate_delete_this_tag'),
content: I18n.t(
'evaluate_deleting_tag_affects_labeled_content',
),
title: I18n.t('delete_this_tag'),
content: I18n.t('deleting_tag_affects_labeled_content'),
cancelText: I18n.t('cancel'),
okText: I18n.t('confirm'),
autoLoading: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { type ReactNode } from 'react';

import classNames from 'classnames';
import { TAG_TYPE_TO_NAME_MAP } from '@cozeloop/tag-components';
import { I18n } from '@cozeloop/i18n-adapter';
import { TypographyText } from '@cozeloop/evaluate-components';
import { type tag } from '@cozeloop/api-schema/data';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ export default function ({
className="text-[rgb(var(--coze-up-brand-9))] cursor-pointer"
onClick={onRefreshPage}
>
{I18n.t('task_refresh')}
{I18n.t('refresh')}
</span>
{I18n.t('page_view')}
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import {
Input,
TextArea,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18n } from '@cozeloop/i18n-adapter';
import {
TypographyText,
TagInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function ExperimentItemDetail({
const header = (
<div className="flex items-center h-5 gap-2 text-sm font-normal">
<div className="flex items-center text-[18px] font-medium">
{I18n.t('loop_evaluate_view_details')}
{I18n.t('loop_view_details')}
<IDWithCopy
id={idString}
prefix={
Expand Down
Loading
Loading