Skip to content

fix: Parameter setting page optimization#3115

Merged
wangdan-fit2cloud merged 1 commit intomainfrom
pr@main/param-optimization
May 20, 2025
Merged

fix: Parameter setting page optimization#3115
wangdan-fit2cloud merged 1 commit intomainfrom
pr@main/param-optimization

Conversation

@wangdan-fit2cloud
Copy link
Contributor

What this PR does / why we need it?

Summary of your change

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@wangdan-fit2cloud wangdan-fit2cloud merged commit a4faf52 into main May 20, 2025
4 checks passed
@wangdan-fit2cloud wangdan-fit2cloud deleted the pr@main/param-optimization branch May 20, 2025 03:46
// }
noReferencesform.value = {
ai_questioning: defaultValue['ai_questioning'],
designated_answer: defaultValue['designated_answer']
Copy link
Contributor

Choose a reason for hiding this comment

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

The code is mostly correct, but there are a few minor issues and improvements that can be made:

  1. The comments added to hide default values when dialogVisible is false are unnecessary and could cause confusion.
  2. Consider removing or commenting out the commented-out lines with default values, unless they serve some specific purpose (e.g., debugging).
  3. Ensure all necessary dependencies like v-loading, refs, and $t are properly imported and defined.
  4. The rest of the logic appears to be correctly implemented.

Here's a slightly optimized version of the relevant part:

watch(dialogVisible, (bool) => {
  if (!bool) {
    form.value.dataset_setting = {
      search_mode: 'embedding',
      top_n: 3,
      similarity: 0.6,
      max_paragraph_char_number: 5000,
      no_references_setting: {
        status: 'ai_questioning',
        value: '{question}'
      }
    };
    noReferencesform.value.ai_questioning = defaultValue['ai_questioning'];
    noReferencesform.value.designated_answer = defaultValue['designated_answer'];
    
    // Optionally, you might want to reset any loading state here
    loading.value = false;
  } else {
    // Initialize form with new defaults or load existing data
  }
});

If you have more complex initialization logic for noReferencesform, it would need to be included within the else block. Make sure to adjust based on your full application structure and requirements.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented May 20, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants