-
Notifications
You must be signed in to change notification settings - Fork 0
Add mock suggestion and suggestion api #81
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
base: main
Are you sure you want to change the base?
Conversation
…nstructor private
🦙 MegaLinter status:
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ JAVA | checkstyle | 11 | 0 | 0 | 2.89s | |
| ✅ PYTHON | bandit | 2 | 0 | 0 | 1.38s | |
| black | 2 | 1 | 0 | 1.64s | ||
| ✅ PYTHON | flake8 | 2 | 0 | 0 | 0.82s | |
| 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
Kyle9410-Chen
left a comment
There was a problem hiding this 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.
src/main/java/tw/commonground/backend/service/suggestion/dto/TextSuggestionResponse.java
Outdated
Show resolved
Hide resolved
src/main/java/tw/commonground/backend/service/suggestion/dto/EditedTextSuggestionResponse.java
Outdated
Show resolved
Hide resolved
src/main/java/tw/commonground/backend/service/suggestion/dto/EditedTextSuggestionRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/tw/commonground/backend/service/suggestion/SuggestionService.java
Outdated
Show resolved
Hide resolved
I’ve removed the database storage. |

Type of Changes
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.
/api/mock-text-suggestionto detect offensive or inappropriate content in text and suggest replacements./api/mock-edited-text-suggestionto detect inappropriate content and provide suggestions for edited texts./api/text-suggestionto create new text suggestions based on input text./api/edited-text-suggestionto create new edited text suggestions, detecting highlighted inappropriate content.Additional Information
/api/mock-text-suggestionand/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:Add the mock api url into your
application-dev.propertiesRelated Links: