forked from CMU-313/cmu-313-s26-nodebb-spring-26-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 0
P4b translation feature #41
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e370fbb
Add backend helper for LLM post translation
IAmCheese1231 f8f1567
Add preferred language API for translation feature
IAmCheese1231 6feec85
Add post translation API handler
IAmCheese1231 e21c428
Expose translation API routes
IAmCheese1231 5a3695e
final
IAmCheese1231 695c925
Add translation UI - translate button and handler
Jingyan5 b99c003
Add Ollama service to docker-compose
Jingyan5 514c673
Refactor user language preference retrieval and enhance post translat…
DanAlejandroRodriguez 94e7258
Add language configuration endpoints for translator plugin
DanAlejandroRodriguez aca0d8f
Standardize YAML reference formatting in Write API documentation
DanAlejandroRodriguez 3bc9f37
Add translation endpoint for posts in Write API
DanAlejandroRodriguez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,57 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| nodebb: | ||
| user: "0" | ||
| build: . | ||
| # image: ghcr.io/nodebb/nodebb:latest | ||
| restart: unless-stopped | ||
| ports: | ||
| - '4567:4567' # comment this out if you don't want to expose NodeBB to the host, or change the first number to any port you want | ||
| - '4567:4567' | ||
| volumes: | ||
| - nodebb-build:/usr/src/app/build | ||
| - nodebb-uploads:/usr/src/app/public/uploads | ||
| - nodebb-config:/opt/config | ||
| - ./install/docker/setup.json:/usr/src/app/setup.json | ||
|
|
||
| environment: | ||
| - OLLAMA_URL=http://ollama:11434/api/chat | ||
| depends_on: | ||
| - redis | ||
| - ollama | ||
| redis: | ||
| image: redis:8.4.0-alpine | ||
| restart: unless-stopped | ||
| command: ['redis-server', '--appendonly', 'yes', '--loglevel', 'warning'] | ||
| # command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"] # uncomment if you want to use snapshotting instead of AOF | ||
| volumes: | ||
| - redis-data:/data | ||
|
|
||
| ollama: | ||
| image: ollama/ollama:latest | ||
| restart: unless-stopped | ||
| volumes: | ||
| - ollama-data:/root/.ollama | ||
| entrypoint: ["/bin/sh", "-c", "ollama serve & sleep 5 && ollama pull llama3.1:8b && wait"] | ||
| volumes: | ||
| redis-data: | ||
| driver: local | ||
| driver_opts: | ||
| o: bind | ||
| type: none | ||
| device: ./.docker/database/redis | ||
|
|
||
| nodebb-build: | ||
| driver: local | ||
| driver_opts: | ||
| o: bind | ||
| type: none | ||
| device: ./.docker/build | ||
|
|
||
| nodebb-uploads: | ||
| driver: local | ||
| driver_opts: | ||
| o: bind | ||
| type: none | ||
| device: ./.docker/public/uploads | ||
|
|
||
| nodebb-config: | ||
| driver: local | ||
| driver_opts: | ||
| o: bind | ||
| type: none | ||
| device: ./.docker/config | ||
| ollama-data: | ||
| driver: local | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The new
ollamaservice usesollama/ollama:latest, which makes builds non-reproducible and can introduce breaking changes unexpectedly. Pin the image to a specific version tag (and ideally make the pulled model configurable via an env var) to improve deployment stability.