docs: LLM translation.#2113
Conversation
|
Does GitHub not show the changed workflow file? It just shows the massive list of docs instead. |
|
No workflow yet as I'm not sure when it should run. Just ran the |
|
Ah, I closed the docs folder and didn't see the file. Thanks, will take a look. |
|
We'll need to add integration with super linter so that AI can automatically fix what it breaks. |
|
Can we simply exclude the Edit: probably a question for @dunglas |
|
I added a |
|
As it's manually triggered, we can't trigger it before it's merged into the default branch (main) iirc. push:
branches:
- main
paths:
- 'docs/*'Should be this though, so it's automatically opened after docs change. |
|
Makes sense, I adjusted the workflow to only trigger on changed english *.md files. Still not sure how to test it manually. I can also remove the docs changes themselves to make this PR slimmer. |
|
Yeah should remove the doc changes. I think we can experiment with it more once the workflow file is merged into main. |
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.5' | ||
| - name: run translation script |
There was a problem hiding this comment.
Maybe could we use gemini-cli or copilot-cli directly, and make it running the linter and fixing the issues?
There was a problem hiding this comment.
The script doesn't need to be PHP, can also be bash. You'll usually get more consistent results if input and output of the LLM are minimized though. Prompting the cli directly makes this too unpredictable and noisy IMO, but we can try as an experiment if you want.
|
The workflow will trigger next time an english |
| - name: run translation script | ||
| if: steps.md_files.outputs.found == 'true' | ||
| env: | ||
| GEMINI_API_KEY: "${{ secrets.GEMINI_API_KEY }}" |
There was a problem hiding this comment.
Could you tell me what token to set @AlliBalliBaba? (I can generate one, we have a Gemini account)
There was a problem hiding this comment.
I used one of mine, but you can replace it under Settings -> Secrets and Variables -> Actions
There was a problem hiding this comment.
I think he's asking how to get the API key out of gemini.
There was a problem hiding this comment.
Has to from here I think https://aistudio.google.com/app/api-keys
As mentioned in #2108, this PR adds a script to translate all English docs via Gemini. LLM translations are generally pretty good, I can't attest to the quality of these translations though as I don't speak any of the languages. wdyt?