fix(style): language menu

This commit is contained in:
jialin
2024-07-08 14:46:33 +08:00
parent 01e9b70f6d
commit 9ad9539b51
13 changed files with 521 additions and 180 deletions
@@ -7,7 +7,7 @@ interface ReferenceParamsProps {
completion_tokens: number;
prompt_tokens: number;
total_tokens: number;
time_per_output_token_ms: number;
tokens_per_second: number;
};
}
@@ -43,7 +43,7 @@ const ReferenceParams = (props: ReferenceParamsProps) => {
<span>
{intl.formatMessage({ id: 'playground.tokenoutput' })}:{' '}
{usage.time_per_output_token_ms * 1000} Tokens/s
{usage.tokens_per_second * 1000} Tokens/s
</span>
</div>
);
@@ -53,7 +53,7 @@ const ViewCodeModal: React.FC<ViewModalProps> = (props) => {
const systemList = systemMessage
? [{ role: 'system', content: systemMessage }]
: [];
const code = `curl ${window.location.origin}/v1-openai/chat/completions \\ \n-H "Content-Type: application/json" \\\n-H "Authorization: Bearer $\{GPUSTACK_API_KEY}" \\\n-d '${JSON.stringify(
const code = `curl ${window.location.origin}/v1-openai/chat/completions \\\n-H "Content-Type: application/json" \\\n-H "Authorization: Bearer $\{GPUSTACK_API_KEY}" \\\n-d '${JSON.stringify(
{
...parameters,
messages: [...systemList, ...messageList]