Skip to content

Conversation

@gunjyo0817
Copy link
Member

@gunjyo0817 gunjyo0817 commented Mar 27, 2025

Type of Changes

  • Feature

Purpose

Introduce a new feature to create user guidance by integrating AI-driven text suggestions.
Add mock suggestion functionality and implement suggestion API endpoints for text and edited text suggestions.

  • Add /api/mock-text-suggestion to detect offensive or inappropriate content in text and suggest replacements.
  • Add /api/mock-edited-text-suggestion to detect inappropriate content and provide suggestions for edited texts.
  • Add /api/text-suggestion to create new text suggestions based on input text.
  • Add /api/edited-text-suggestion to create new edited text suggestions, detecting highlighted inappropriate content.

Additional Information

  • The mock services (/api/mock-text-suggestion and /api/mock-edited-text-suggestion) will eventually be replaced by the AI Team's implemented suggestion container for advanced AI-driven suggestions.

Running the Mock Suggestion Service:

The mock suggestion service runs on port 5001:

docker build -t mock-suggestion ./mock/suggestion
docker run -p 5001:5000 mock-suggestion

Add the mock api url into your application-dev.properties

mockApiUrl=http://localhost:5001

Related Links:

@gunjyo0817 gunjyo0817 self-assigned this Mar 27, 2025
@github-actions
Copy link

github-actions bot commented Mar 27, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ JAVA checkstyle 11 0 0 2.89s
✅ PYTHON bandit 2 0 0 1.38s
⚠️ PYTHON black 2 1 0 1.64s
✅ PYTHON flake8 2 0 0 0.82s
⚠️ PYTHON isort 2 1 0 0.33s
✅ PYTHON mypy 2 0 0 3.52s
✅ PYTHON ruff 2 0 0 0.02s
✅ REPOSITORY dustilock yes no no 0.25s
✅ REPOSITORY gitleaks yes no no 1.63s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 25.55s
✅ REPOSITORY secretlint yes no no 2.17s
✅ REPOSITORY syft yes no no 1.83s
✅ REPOSITORY trivy-sbom yes no no 0.37s
✅ REPOSITORY trufflehog yes no no 4.95s
✅ SPELL lychee 1 0 0 0.12s
✅ YAML prettier 1 0 0 0.35s
✅ YAML v8r 1 0 0 3.61s
✅ YAML yamllint 1 0 0 0.31s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@gunjyo0817 gunjyo0817 changed the title Feat/add mock suggestion and suggestion api feat: add mock suggestion and suggestion api Mar 29, 2025
@gunjyo0817 gunjyo0817 changed the title feat: add mock suggestion and suggestion api Add mock suggestion and suggestion api Apr 15, 2025
Copy link
Member

@Kyle9410-Chen Kyle9410-Chen left a comment

Choose a reason for hiding this comment

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

For Text Suggestion, since the backend currently serves only as a bridge between the frontend and the AI service, there doesn’t seem to be any need to persist the suggestion results in the database.

@gunjyo0817 gunjyo0817 requested a review from Kyle9410-Chen May 7, 2025 07:03
@gunjyo0817
Copy link
Member Author

For Text Suggestion, since the backend currently serves only as a bridge between the frontend and the AI service, there doesn’t seem to be any need to persist the suggestion results in the database.

I’ve removed the database storage.

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.

3 participants