Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rrefine english words #2176

Merged
merged 1 commit into from
Feb 9, 2025
Merged
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
4 changes: 2 additions & 2 deletions ui/src/locales/lang/en-US/ai-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export default {
KnowledgeSource: {
title: 'Knowledge Source',
referenceParagraph: 'Cited Segment',
consume: 'Token Consumption',
consumeTime: 'Processing Time'
consume: 'Tokens',
consumeTime: 'Runtime'
},
paragraphSource: {
title: 'Knowledge Quote',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code appears to be JavaScript ES6 syntax for exporting an object containing configurations for a knowledge management system. However, there are some issues that need addressing:

  1. Duplicate Entries: The consume and consumeTime properties have duplicate keys in both KnowledgeSource and paragraphSource. This is redundant and could potentially lead to unexpected behavior when the code is used.

  2. Consistent Property Names: While you've changed "tokens" for KnowledgeSource.consume, it's important to ensure consistency within the same property structure. It might make sense to rename other similar properties across objects if they are intended to represent different metrics but use the same concept ("Tokens").

  3. Comments vs. Code: There isn't any explanation of what "Tokens" means without additional context. If needed, consider adding comments or documentation explaining these metric names.

  4. Typo Correction: The line - consume: 'Token Consumption', appears to contain a typo; it should likely read tokenConsumption.

Overall, while this code snippet is functional, maintaining clarity and consistency is beneficial for readability and maintainability.

Expand Down