Skip to content

Retry intent detection if incorrect parameters are sent#33

Merged
Mitchell-UCF-Git merged 2 commits intomainfrom
intent-detection-retry
Apr 5, 2025
Merged

Retry intent detection if incorrect parameters are sent#33
Mitchell-UCF-Git merged 2 commits intomainfrom
intent-detection-retry

Conversation

@Jacob-Stella
Copy link
Contributor

@Jacob-Stella Jacob-Stella commented Mar 29, 2025

This retries intent detection if an incorrect parameter is sent, as title states.

@gavinmortensen gavinmortensen marked this pull request as ready for review March 31, 2025 20:59
Copilot AI review requested due to automatic review settings March 31, 2025 20:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a retry mechanism for intent detection when incorrect parameters are sent.

  • Updated LoadIntentDetectionResponse, HandleWorkflow, and makeAPICall signatures to accept an additional parameter (originalInput) for retrying.
  • Modified loadprompt.go to pass the user input to LoadIntentDetectionResponse.
  • Added retry logic within makeAPICall to restart intent detection when the response includes unnecessary data.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/callers/loadprompt.go Updated the call to LoadIntentDetectionResponse to include the user text input.
internal/callers/contentgen.go Modified function signatures and added retry logic in makeAPICall for error handling.

Copy link
Contributor

@Mitchell-UCF-Git Mitchell-UCF-Git left a comment

Choose a reason for hiding this comment

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

looks good

@Mitchell-UCF-Git Mitchell-UCF-Git merged commit 4b75f7b into main Apr 5, 2025
1 check passed
@gavinmortensen gavinmortensen deleted the intent-detection-retry branch April 8, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants