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 content standalone endpoint response object #177

Conversation

gkumbhat
Copy link
Collaborator

Changes

  • We were currently sending out TokenClassificationResult for /content endpoint, which is incorrect as per the agreed upon API spec. This PR fixes that by adding a separate detect_content function that provides this response object.

Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

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

LGTM, let's open a follow-up issue for the duplication here since it could get confusing

@@ -519,6 +555,55 @@ pub async fn detect(
Ok::<Vec<TokenClassificationResult>, Error>(results)
}

/// Sends a request to a detector service and applies threshold.
/// TODO: Cleanup by removing duplicate code and merging it with above `detect` function
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's open issue for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

issue: #178

@gkumbhat gkumbhat merged commit 52bc871 into foundation-model-stack:main Aug 23, 2024
2 checks passed
@gkumbhat gkumbhat deleted the fix_content_standalone_detection branch August 23, 2024 18:21
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.

2 participants