]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔨 Update LLM translation script to guide reviewers to change the prompt (#14614)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 27 Dec 2025 19:05:53 +0000 (11:05 -0800)
committerGitHub <noreply@github.com>
Sat, 27 Dec 2025 19:05:53 +0000 (19:05 +0000)
scripts/translate.py

index 6ebd24f547e8b9c20b3bc17dcc7b9287172bd0a7..66da46a0833722812934677c8d3e87768cae4c4a 100644 (file)
@@ -1036,9 +1036,13 @@ def make_pr(
     print("Creating PR")
     g = Github(github_token)
     gh_repo = g.get_repo(github_repository)
-    pr = gh_repo.create_pull(
-        title=message, body=message, base="master", head=branch_name
+    body = (
+        message
+        + "\n\nThis PR was created automatically using LLMs."
+        + f"\n\nIt uses the prompt file https://github.com/fastapi/fastapi/blob/master/docs/{language}/llm-prompt.md."
+        + "\n\nIn most cases, it's better to make PRs updating that file so that the LLM can do a better job generating the translations than suggesting changes in this PR."
     )
+    pr = gh_repo.create_pull(title=message, body=body, base="master", head=branch_name)
     print(f"Created PR: {pr.number}")
     print("Finished")