fix: Introduce dedicated expense terminology and tooltips to Logs Table
- Improve clarity and context in LogsTable by adding tooltips to table headers - Replace "quota" with "expense" throughout LogsTable component - Change error formatting from `%w` to `%v` in `controller/relay.go`
This commit is contained in:
parent
b747cdbc6f
commit
4884b21865
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
// Regex to match data URL pattern
|
||||
var dataURLPattern = regexp.MustCompile(`data:image/([^;]+);base64,(.*)`)
|
||||
var dataURLPattern = regexp.MustCompile(`data:image/([^;]+);base64,(.*)`)
|
||||
|
||||
func IsImageUrl(url string) (bool, error) {
|
||||
resp, err := http.Head(url)
|
||||
|
@ -60,7 +60,7 @@ func Relay(c *gin.Context) {
|
||||
for i := retryTimes; i > 0; i-- {
|
||||
channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel)
|
||||
if err != nil {
|
||||
logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %w", err)
|
||||
logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %v", err)
|
||||
break
|
||||
}
|
||||
logger.Infof(ctx, "using channel #%d to retry (remain times %d)", channel.Id, i)
|
||||
|
@ -319,7 +319,7 @@ const LogsTable = () => {
|
||||
}}
|
||||
width={1}
|
||||
>
|
||||
额度
|
||||
费用
|
||||
</Table.HeaderCell>
|
||||
<Table.HeaderCell
|
||||
style={{ cursor: 'pointer' }}
|
||||
@ -359,7 +359,7 @@ const LogsTable = () => {
|
||||
<Table.Cell>{log.model_name ? <Label basic>{log.model_name}</Label> : ''}</Table.Cell>
|
||||
<Table.Cell>{log.prompt_tokens ? log.prompt_tokens : ''}</Table.Cell>
|
||||
<Table.Cell>{log.completion_tokens ? log.completion_tokens : ''}</Table.Cell>
|
||||
<Table.Cell>{log.quota ? renderQuota(log.quota, 6) : ''}</Table.Cell>
|
||||
<Table.Cell>{log.quota ? renderQuota(log.quota, 6) : 'free'}</Table.Cell>
|
||||
<Table.Cell>{log.content}</Table.Cell>
|
||||
</Table.Row>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user