Skip to content

[SC 10123 ] Support qualitative text generation#366

Merged
AnilSorathiya merged 5 commits intomainfrom
anilsorathiya/sc-10123/support-the-qualitative-text-generation-in
May 23, 2025
Merged

[SC 10123 ] Support qualitative text generation#366
AnilSorathiya merged 5 commits intomainfrom
anilsorathiya/sc-10123/support-the-qualitative-text-generation-in

Conversation

@AnilSorathiya
Copy link
Contributor

@AnilSorathiya AnilSorathiya commented May 7, 2025

Pull Request Description

Qualitative text generation using the LLM is currently available only through the UI.

What

Added new task type called qualitative_text_generation in the vm.experimental.agents.run_task.

Why

Qualitative text generation using the LLM is currently available only through the UI. This change will allow generate qualitative section from ValidMind library.

How to Test

result = vm.experimental.agents.run_task(
    task="qualitative_text_generation",
    input={
        "content_id": "model_overview",
    }
)
result.log(content_id="model_overview")

where, task type is qualitative_text_generation. This will generate text through LLM functionality.

Pull Request Dependencies

https://github.com/validmind/backend/pull/1444

External Release Notes

Qualitative text generation using the LLM is currently available only through the UI. This change provide interfaces to generate text for a specific section of document using the vm.experimental.agents.run_task method.

Deployment Notes

Breaking Changes

Screenshots/Videos (Frontend Only)

The content will be generated using the code above and it will visible in the model_overview text block section.

image

Checklist

  • PR body describes what, why, and how to test
  • Release notes written
  • Deployment notes written
  • Breaking changes identified
  • Labels applied
  • PR linked to Shortcut
  • Screenshots/videos added (Frontend)
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)

Areas Needing Special Review

Additional Notes

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

PR Summary

This pull request enhances the run_task function in the validmind/experimental/agents.py file to support a new task type: qualitative_text_generation. Previously, the function only supported the code_explainer task. The change involves modifying the conditional check to include qualitative_text_generation and dynamically constructing the API endpoint URL based on the task type. This allows the function to handle requests for both code_explainer and qualitative_text_generation tasks by sending a POST request to the appropriate endpoint.

Test Suggestions

  • Test the run_task function with the code_explainer task to ensure existing functionality is not broken.
  • Test the run_task function with the qualitative_text_generation task to verify the new functionality works as expected.
  • Test the run_task function with an unsupported task to ensure it raises a ValueError.
  • Simulate a network failure and test if the function raises a requests.exceptions.RequestException.

@github-actions
Copy link
Contributor

PR Summary

This pull request enhances the run_task function in the validmind/experimental/agents.py module to support a new task type: qualitative_text_generation. Previously, the function only supported the code_explainer task. The change involves modifying the conditional check to include qualitative_text_generation and dynamically constructing the API endpoint URL based on the task type. This allows the function to handle requests for both code_explainer and qualitative_text_generation tasks by sending a POST request to the appropriate endpoint.

Test Suggestions

  • Test run_task with task set to code_explainer to ensure existing functionality is not broken.
  • Test run_task with task set to qualitative_text_generation to verify the new functionality works as expected.
  • Test run_task with an unsupported task to ensure it raises a ValueError.
  • Simulate a network failure and ensure run_task raises a requests.exceptions.RequestException.

@AnilSorathiya AnilSorathiya added the enhancement New feature or request label May 14, 2025
@github-actions
Copy link
Contributor

PR Summary

This pull request enhances the run_task function in the validmind/experimental/agents.py module to support a new task type: qualitative_text_generation. Previously, the function only supported the code_explainer task. The change involves modifying the conditional check to include qualitative_text_generation and dynamically constructing the API endpoint URL based on the task type. This allows the function to handle requests for both code_explainer and qualitative_text_generation tasks by sending a POST request to the appropriate endpoint.

Test Suggestions

  • Test run_task with task set to code_explainer to ensure existing functionality is not broken.
  • Test run_task with task set to qualitative_text_generation to verify the new functionality works as expected.
  • Test run_task with an unsupported task to ensure it raises a ValueError.
  • Simulate a network failure and ensure run_task raises a requests.exceptions.RequestException.

Copy link
Contributor

@cachafla cachafla left a comment

Choose a reason for hiding this comment

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

👌

@AnilSorathiya AnilSorathiya merged commit 784e575 into main May 23, 2025
7 checks passed
@AnilSorathiya AnilSorathiya deleted the anilsorathiya/sc-10123/support-the-qualitative-text-generation-in branch May 23, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants