.ai-commit.json 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. {
  2. "commit_options": [
  3. "--edit"
  4. ],
  5. "diff_options": [
  6. ":!*-lock.json",
  7. ":!*.lock",
  8. ":!*.sum"
  9. ],
  10. "http_options": {
  11. "verify": false,
  12. "connect_timeout": 30,
  13. "timeout": 120
  14. },
  15. "retry": {
  16. "times": 3,
  17. "sleep": 200
  18. },
  19. "diff_mark": "<diff>",
  20. "type_mark": "<type>",
  21. "type_prompt_mark": "<type-prompt>",
  22. "type_prompt": "- Use commit type `%s`.",
  23. "types": {
  24. "auto": "Automatically generate commit type",
  25. "feat": "A new feature",
  26. "fix": "A bug fix",
  27. "docs": "Documentation only changes",
  28. "style": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
  29. "refactor": "A code change that neither fixes a bug nor adds a feature",
  30. "perf": "A code change that improves performance",
  31. "test": "Adding missing tests or correcting existing tests",
  32. "build": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
  33. "ci": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
  34. "chore": "Other changes that don't modify src or test files",
  35. "revert": "Reverts a previous commit"
  36. },
  37. "no_edit": false,
  38. "no_verify": false,
  39. "prompt": "conventional",
  40. "generator": "moonshot",
  41. "generators": {
  42. "bito_cli": {
  43. "driver": "bito_cli",
  44. "path": "bito",
  45. "prompt_filename": "bito.prompt",
  46. "parameters": {
  47. "cwd": null,
  48. "env": null,
  49. "input": null,
  50. "timeout": 120
  51. }
  52. },
  53. "ernie_bot": {
  54. "driver": "ernie_bot",
  55. "api_key": "...",
  56. "secret_key": "...",
  57. "parameters": {
  58. "temperature": 0.95,
  59. "top_p": 0.8,
  60. "penalty_score": 1,
  61. "stream": true
  62. }
  63. },
  64. "ernie_bot_turbo": {
  65. "driver": "ernie_bot_turbo",
  66. "api_key": "...",
  67. "secret_key": "...",
  68. "parameters": {
  69. "temperature": 0.95,
  70. "top_p": 0.8,
  71. "penalty_score": 1,
  72. "stream": true
  73. }
  74. },
  75. "moonshot": {
  76. "driver": "moonshot",
  77. "api_key": "sk-SYN427v6luITEeMt8l3ZZR1KFaMQrrfVclRJBjgeY68QKZmi",
  78. "parameters": {
  79. "model": "moonshot-v1-8k",
  80. "max_tokens": 600,
  81. "temperature": 0,
  82. "top_p": 1,
  83. "n": 1,
  84. "stream": true,
  85. "stop": null,
  86. "presence_penalty": 0,
  87. "frequency_penalty": 0
  88. }
  89. },
  90. "openai": {
  91. "driver": "openai",
  92. "api_key": "sk-SYN427v6luITEeMt8l3ZZR1KFaMQrrfVclRJBjgeY68QKZmi",
  93. "parameters": {
  94. "model": "text-davinci-003",
  95. "suffix": null,
  96. "max_tokens": 600,
  97. "temperature": 0,
  98. "top_p": 1,
  99. "n": 1,
  100. "stream": true,
  101. "logprobs": null,
  102. "echo": false,
  103. "stop": null,
  104. "presence_penalty": 0,
  105. "frequency_penalty": 0,
  106. "best_of": 1
  107. }
  108. },
  109. "openai_chat": {
  110. "driver": "openai_chat",
  111. "api_key": "sk-SYN427v6luITEeMt8l3ZZR1KFaMQrrfVclRJBjgeY68QKZmi",
  112. "parameters": {
  113. "model": "gpt-3.5-turbo",
  114. "max_tokens": 600,
  115. "temperature": 0,
  116. "top_p": 1,
  117. "n": 1,
  118. "stream": true,
  119. "stop": null,
  120. "presence_penalty": 0,
  121. "frequency_penalty": 0
  122. }
  123. }
  124. },
  125. "prompts": {
  126. "conventional": "Here are some best practices for writing commit messages:\n- Write clear, concise, and descriptive messages that explain the changes made in the commit.\n- Use the present tense and active voice in the message, for example, \"Fix bug\" instead of \"Fixed bug.\"\n- Use the imperative mood, which gives the message a sense of command, e.g. \"Add feature\" instead of \"Added feature\"\n- Limit the subject line to 72 characters or less.\n- Capitalize the subject line.\n- Do not end the subject line with a period.\n- Limit the body of the message to 256 characters or less.\n- Use a blank line between the subject and the body of the message.\n- Use the body of the message to provide additional context or explain the reasoning behind the changes.\n- Avoid using general terms like \"update\" or \"change\" in the subject line, be specific about what was updated or changed.\n- Explain, What was done at a glance in the subject line, and provide additional context in the body of the message.\n- Why the change was necessary in the body of the message.\n- The details about what was done in the body of the message.\n- Any useful details concerning the change in the body of the message.\n- Use a hyphen (-) for the bullet points in the body of the message.\n<type-prompt>\nWrite 1 commit messages that accurately summarizes the changes made in the given `git diff` output, following the best practices listed above and the conventional commit format in Chinese.\nPlease provide a response in the form of a valid JSON object and do not include \"Output:\", \"Response:\" or anything similar to those two before it, in the following format:\n{\n \"subject\": \"<type>(<scope>): <subject>\",\n \"body\": \"<BODY (bullet points)>\"\n}\n\nHere is the output of the `git diff`:\n<diff>"
  127. }
  128. }