diff --git a/src/locales/en-US/playground.ts b/src/locales/en-US/playground.ts index 1d00dfd3..737c9343 100644 --- a/src/locales/en-US/playground.ts +++ b/src/locales/en-US/playground.ts @@ -12,6 +12,8 @@ export default { 'You can use the following code to start integrating your current prompt and settings into your application.', 'playground.completion': 'Completion', 'playground.prompt': 'Prompt', + 'playground.timeToFirstToken': 'Time to first token', + 'playground.timePerOutputToken': 'Time per output token', 'playground.tokenusage': 'Token Usage', 'models.openinplayground': 'Open in Playground', 'playground.tokenoutput': 'Output', @@ -25,6 +27,6 @@ export default { 'If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.', 'playground.params.stop.tips': 'A stop sequence is a predefined or user-specified text string that signals the AI to stop generating further tokens when these sequences appear.', - 'playground.viewcode.tips': 'Your API Key can be found {here}.', + 'playground.viewcode.tips': 'Your API Key can be found {here}', 'playground.viewcode.here': 'here' }; diff --git a/src/locales/zh-CN/playground.ts b/src/locales/zh-CN/playground.ts index f76852f5..2c55d06c 100644 --- a/src/locales/zh-CN/playground.ts +++ b/src/locales/zh-CN/playground.ts @@ -12,6 +12,8 @@ export default { '你可以使用以下代码将当前的提示和设置集成到你的应用程序中。', 'playground.completion': '补全', 'playground.prompt': '提示', + 'playground.timeToFirstToken': '输出首个 token 时间', + 'playground.timePerOutputToken': '生成每个 token 时间', 'playground.tokenusage': 'Token 使用量', 'models.openinplayground': '打开试验场', 'playground.tokenoutput': '输出', diff --git a/src/pages/llmodels/components/instance-item.tsx b/src/pages/llmodels/components/instance-item.tsx index 2c086662..906e54ed 100644 --- a/src/pages/llmodels/components/instance-item.tsx +++ b/src/pages/llmodels/components/instance-item.tsx @@ -121,9 +121,7 @@ const InstanceItem: React.FC = ({ - {dayjs(item.created_at) - .local() - .format('YYYY-MM-DD HH:mm:ss')} + {dayjs(item.created_at).format('YYYY-MM-DD HH:mm:ss')} diff --git a/src/pages/llmodels/components/table-list.tsx b/src/pages/llmodels/components/table-list.tsx index e013595b..4eeae7d0 100644 --- a/src/pages/llmodels/components/table-list.tsx +++ b/src/pages/llmodels/components/table-list.tsx @@ -378,8 +378,7 @@ const Models: React.FC = ({ showSorterTooltip={false} sorter={true} render={(text, row) => { - console.log('val=time===', text, row.name, row, row.created_at); - return dayjs(text).local().format('YYYY-MM-DD HH:mm:ss'); + return dayjs(text).format('YYYY-MM-DD HH:mm:ss'); }} /> { - {intl.formatMessage({ id: 'playground.tokenoutput' })}:{' '} - {_.round(usage.tokens_per_second, 2)} Tokens/s + + + {intl.formatMessage({ id: 'playground.timePerOutputToken' })}:{' '} + {_.round(usage.time_per_output_token_ms, 2)} ms + + + {intl.formatMessage({ id: 'playground.timeToFirstToken' })}:{' '} + {_.round(usage.time_to_first_token_ms, 2)} ms + + + } + > + + {intl.formatMessage({ id: 'playground.tokenoutput' })}:{' '} + {_.round(usage.tokens_per_second, 2)} Tokens/s + + ); diff --git a/src/pages/playground/components/view-code-modal.tsx b/src/pages/playground/components/view-code-modal.tsx index ba2ed545..89efa476 100644 --- a/src/pages/playground/components/view-code-modal.tsx +++ b/src/pages/playground/components/view-code-modal.tsx @@ -177,6 +177,7 @@ const ViewCodeModal: React.FC = (props) => { size="small" href="#/api-keys" target="_blank" + style={{ paddingInline: 2 }} > {' '}