ultralytics-actions 0.0.50__py3-none-any.whl → 0.0.52__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- actions/__init__.py +1 -1
- actions/first_interaction.py +1 -1
- actions/summarize_pr.py +1 -1
- actions/summarize_release.py +1 -1
- actions/update_markdown_code_blocks.py +8 -4
- actions/utils/openai_utils.py +7 -1
- {ultralytics_actions-0.0.50.dist-info → ultralytics_actions-0.0.52.dist-info}/METADATA +1 -1
- ultralytics_actions-0.0.52.dist-info/RECORD +15 -0
- {ultralytics_actions-0.0.50.dist-info → ultralytics_actions-0.0.52.dist-info}/WHEEL +1 -1
- ultralytics_actions-0.0.50.dist-info/RECORD +0 -15
- {ultralytics_actions-0.0.50.dist-info → ultralytics_actions-0.0.52.dist-info}/LICENSE +0 -0
- {ultralytics_actions-0.0.50.dist-info → ultralytics_actions-0.0.52.dist-info}/entry_points.txt +0 -0
- {ultralytics_actions-0.0.50.dist-info → ultralytics_actions-0.0.52.dist-info}/top_level.txt +0 -0
actions/__init__.py
CHANGED
actions/first_interaction.py
CHANGED
@@ -177,7 +177,7 @@ YOUR RESPONSE (label names only):
|
|
177
177
|
},
|
178
178
|
{"role": "user", "content": prompt},
|
179
179
|
]
|
180
|
-
suggested_labels = get_completion(messages)
|
180
|
+
suggested_labels = get_completion(messages, temperature=0.2)
|
181
181
|
if "none" in suggested_labels.lower():
|
182
182
|
return []
|
183
183
|
|
actions/summarize_pr.py
CHANGED
@@ -88,7 +88,7 @@ def generate_pr_summary(repository, diff_text):
|
|
88
88
|
f"\n\nHere's the PR diff:\n\n{diff_text[:limit]}",
|
89
89
|
},
|
90
90
|
]
|
91
|
-
reply = get_completion(messages)
|
91
|
+
reply = get_completion(messages, temperature=0.2)
|
92
92
|
if len(diff_text) > limit:
|
93
93
|
reply = "**WARNING ⚠️** this PR is very large, summary may not cover all changes.\n\n" + reply
|
94
94
|
return SUMMARY_START + reply
|
actions/summarize_release.py
CHANGED
@@ -134,7 +134,7 @@ def generate_release_summary(
|
|
134
134
|
},
|
135
135
|
]
|
136
136
|
print(messages[-1]["content"]) # for debug
|
137
|
-
return get_completion(messages) + release_suffix
|
137
|
+
return get_completion(messages, temperature=0.2) + release_suffix
|
138
138
|
|
139
139
|
|
140
140
|
def create_github_release(repo_name: str, tag_name: str, name: str, body: str, headers: dict) -> int:
|
@@ -48,15 +48,19 @@ def format_code_with_ruff(temp_dir):
|
|
48
48
|
|
49
49
|
try:
|
50
50
|
# Run ruff check with ignored rules:
|
51
|
-
#
|
52
|
-
#
|
51
|
+
# D101 Missing docstring in public class
|
52
|
+
# D103 Missing docstring in public function
|
53
|
+
# F821 Undefined name
|
54
|
+
# F841 Local variable is assigned to but never used
|
53
55
|
subprocess.run(
|
54
56
|
[
|
55
57
|
"ruff",
|
56
58
|
"check",
|
57
59
|
"--fix",
|
58
|
-
"--
|
59
|
-
"--
|
60
|
+
"--unsafe-fixes",
|
61
|
+
"--extend-select=I,D,UP",
|
62
|
+
"--target-version=py38",
|
63
|
+
"--ignore=D100,D101,D103,D104,D203,D205,D212,D213,D401,D406,D407,D413,F821,F841",
|
60
64
|
str(temp_dir),
|
61
65
|
],
|
62
66
|
check=True,
|
actions/utils/openai_utils.py
CHANGED
@@ -16,6 +16,7 @@ def get_completion(
|
|
16
16
|
messages: List[Dict[str, str]],
|
17
17
|
check_links: bool = True,
|
18
18
|
remove: List[str] = (" @giscus[bot]",), # strings to remove from response
|
19
|
+
temperature: float = 0.7, # default temperature value
|
19
20
|
) -> str:
|
20
21
|
"""Generates a completion using OpenAI's API based on input messages."""
|
21
22
|
assert OPENAI_API_KEY, "OpenAI API key is required."
|
@@ -25,7 +26,12 @@ def get_completion(
|
|
25
26
|
content = ""
|
26
27
|
max_retries = 2
|
27
28
|
for attempt in range(max_retries + 2): # attempt = [0, 1, 2, 3], 2 random retries before asking for no links
|
28
|
-
data = {
|
29
|
+
data = {
|
30
|
+
"model": OPENAI_MODEL,
|
31
|
+
"messages": messages,
|
32
|
+
"seed": int(time.time() * 1000),
|
33
|
+
"temperature": temperature,
|
34
|
+
}
|
29
35
|
|
30
36
|
r = requests.post(url, headers=headers, json=data)
|
31
37
|
r.raise_for_status()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.52
|
4
4
|
Summary: Ultralytics Actions for GitHub automation and PR management.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
actions/__init__.py,sha256=kBsgjgS992W73tTTjLrTK28ghkj7liHMkvtoniCb-xg,742
|
2
|
+
actions/first_interaction.py,sha256=1_WvQHCi5RWaSfyi49ClF2Zk_3CKGjFnZqz6FlxPRAc,17868
|
3
|
+
actions/summarize_pr.py,sha256=WHte6PNJbk_-T8fRDJERs6x3KL4Ah54oH0OH-tsqMUA,11092
|
4
|
+
actions/summarize_release.py,sha256=tov6qsYGC68lfobvkwVyoWZBGtJ598G0m097n4Ydzvo,8472
|
5
|
+
actions/update_markdown_code_blocks.py,sha256=ip-KRIfnTMDrs9IOqdSY7YXR4abNLsylGnXtrvoXjwY,6601
|
6
|
+
actions/utils/__init__.py,sha256=WStdEAYROVnF0nubEOmrFLrejkRiMXIefA5O1ckfcFs,476
|
7
|
+
actions/utils/common_utils.py,sha256=LJ79U5sQuTnVyhc22Bryb5YUBAWy13rGoHdfbaBQl3s,5988
|
8
|
+
actions/utils/github_utils.py,sha256=0h0Hz2tgUta61Ymn9YggRXBZ7aZdF5krKnX7Tj9jqRU,7068
|
9
|
+
actions/utils/openai_utils.py,sha256=EQE2qJu8M5hfPMaN9GTZTSChLMyFUB7mG1fVcGrf2Kw,1968
|
10
|
+
ultralytics_actions-0.0.52.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
+
ultralytics_actions-0.0.52.dist-info/METADATA,sha256=HRBkWBBHLVr6gS0U8k3bxJpqMqmZN2wBnKSO7SxQXug,10561
|
12
|
+
ultralytics_actions-0.0.52.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
13
|
+
ultralytics_actions-0.0.52.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
|
14
|
+
ultralytics_actions-0.0.52.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
+
ultralytics_actions-0.0.52.dist-info/RECORD,,
|
@@ -1,15 +0,0 @@
|
|
1
|
-
actions/__init__.py,sha256=4U8iPnscnkKIwXcYrHT-0T4HHmy37vzw_sbFoMwGSyw,742
|
2
|
-
actions/first_interaction.py,sha256=Oosw3GlXObF4RxYJG8haIjKXSV4MAx_uPXfMdRKY5qA,17851
|
3
|
-
actions/summarize_pr.py,sha256=gLtKlE_iKzP92vBfA-KA9bXUwdrKIe79pH2f4Oyq_gg,11075
|
4
|
-
actions/summarize_release.py,sha256=2D1IIeS4xrQNEJER3HItm5u9XvTL8hwGX_jWD2S8q1Y,8455
|
5
|
-
actions/update_markdown_code_blocks.py,sha256=DN6rrDw2VHXUTetrrg1SHlYDco9iaGOfQBKFORqbCBI,6362
|
6
|
-
actions/utils/__init__.py,sha256=WStdEAYROVnF0nubEOmrFLrejkRiMXIefA5O1ckfcFs,476
|
7
|
-
actions/utils/common_utils.py,sha256=LJ79U5sQuTnVyhc22Bryb5YUBAWy13rGoHdfbaBQl3s,5988
|
8
|
-
actions/utils/github_utils.py,sha256=0h0Hz2tgUta61Ymn9YggRXBZ7aZdF5krKnX7Tj9jqRU,7068
|
9
|
-
actions/utils/openai_utils.py,sha256=U7DjxTdFGdhmWSE4_KIg1yPQdtrfG4GkbNZCgMw4_1Q,1822
|
10
|
-
ultralytics_actions-0.0.50.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
-
ultralytics_actions-0.0.50.dist-info/METADATA,sha256=qPiz8EXLadPuzCesY3Sojb5Hs-D-B2j5znK16qmYR9I,10561
|
12
|
-
ultralytics_actions-0.0.50.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
13
|
-
ultralytics_actions-0.0.50.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
|
14
|
-
ultralytics_actions-0.0.50.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
-
ultralytics_actions-0.0.50.dist-info/RECORD,,
|
File without changes
|
{ultralytics_actions-0.0.50.dist-info → ultralytics_actions-0.0.52.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|