style: playground output tips
This commit is contained in:
@@ -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'
|
||||
};
|
||||
|
||||
@@ -12,6 +12,8 @@ export default {
|
||||
'你可以使用以下代码将当前的提示和设置集成到你的应用程序中。',
|
||||
'playground.completion': '补全',
|
||||
'playground.prompt': '提示',
|
||||
'playground.timeToFirstToken': '输出首个 token 时间',
|
||||
'playground.timePerOutputToken': '生成每个 token 时间',
|
||||
'playground.tokenusage': 'Token 使用量',
|
||||
'models.openinplayground': '打开试验场',
|
||||
'playground.tokenoutput': '输出',
|
||||
|
||||
@@ -121,9 +121,7 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
</Col>
|
||||
<Col span={5}>
|
||||
<span style={{ paddingLeft: 38 }}>
|
||||
{dayjs(item.created_at)
|
||||
.local()
|
||||
.format('YYYY-MM-DD HH:mm:ss')}
|
||||
{dayjs(item.created_at).format('YYYY-MM-DD HH:mm:ss')}
|
||||
</span>
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
|
||||
@@ -378,8 +378,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
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');
|
||||
}}
|
||||
/>
|
||||
<SealColumn
|
||||
|
||||
@@ -9,6 +9,8 @@ interface ReferenceParamsProps {
|
||||
prompt_tokens: number;
|
||||
total_tokens: number;
|
||||
tokens_per_second: number;
|
||||
time_per_output_token_ms: number;
|
||||
time_to_first_token_ms: number;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,8 +45,26 @@ const ReferenceParams = (props: ReferenceParamsProps) => {
|
||||
</span>
|
||||
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'playground.tokenoutput' })}:{' '}
|
||||
{_.round(usage.tokens_per_second, 2)} Tokens/s
|
||||
<Tooltip
|
||||
trigger={['click']}
|
||||
title={
|
||||
<Space>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'playground.timePerOutputToken' })}:{' '}
|
||||
{_.round(usage.time_per_output_token_ms, 2)} ms
|
||||
</span>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'playground.timeToFirstToken' })}:{' '}
|
||||
{_.round(usage.time_to_first_token_ms, 2)} ms
|
||||
</span>
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage({ id: 'playground.tokenoutput' })}:{' '}
|
||||
{_.round(usage.tokens_per_second, 2)} Tokens/s
|
||||
</span>
|
||||
</Tooltip>
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -177,6 +177,7 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
|
||||
size="small"
|
||||
href="#/api-keys"
|
||||
target="_blank"
|
||||
style={{ paddingInline: 2 }}
|
||||
>
|
||||
<span>
|
||||
{' '}
|
||||
|
||||
Reference in New Issue
Block a user