gac 0.17.7__py3-none-any.whl → 0.18.1__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.

Potentially problematic release.


This version of gac might be problematic. Click here for more details.

gac/__version__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Version information for gac package."""
2
2
 
3
- __version__ = "0.17.7"
3
+ __version__ = "0.18.1"
gac/ai.py CHANGED
@@ -30,13 +30,11 @@ def count_tokens(content: str | list[dict[str, str]] | dict[str, Any], model: st
30
30
 
31
31
  try:
32
32
  client = anthropic.Anthropic()
33
- # Extract the actual model name after the provider prefix
33
+
34
+ # Use the messages.count_tokens API for accurate counting
34
35
  model_name = model.split(":", 1)[1] if ":" in model else "claude-3-5-haiku-latest"
36
+ response = client.messages.count_tokens(model=model_name, messages=[{"role": "user", "content": text}])
35
37
 
36
- # Use the beta messages.count_tokens API for accurate counting
37
- response = client.messages.count_tokens(
38
- model=model_name, messages=[{"role": "user", "content": text}], betas=["token-counting-2024-11-01"]
39
- )
40
38
  return response.input_tokens
41
39
  except Exception:
42
40
  # Fallback to simple estimation for Anthropic models
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gac
3
- Version: 0.17.7
3
+ Version: 0.18.1
4
4
  Summary: AI-powered Git commit message generator with multi-provider support
5
5
  Project-URL: Homepage, https://github.com/cellwebb/gac
6
6
  Project-URL: Documentation, https://github.com/cellwebb/gac#readme
@@ -22,13 +22,11 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
22
22
  Requires-Python: >=3.10
23
23
  Requires-Dist: aisuite
24
24
  Requires-Dist: anthropic
25
- Requires-Dist: black
26
25
  Requires-Dist: cerebras-cloud-sdk
27
26
  Requires-Dist: click
28
27
  Requires-Dist: docstring-parser
29
28
  Requires-Dist: groq
30
29
  Requires-Dist: halo
31
- Requires-Dist: isort
32
30
  Requires-Dist: ollama
33
31
  Requires-Dist: openai
34
32
  Requires-Dist: pydantic
@@ -1,6 +1,6 @@
1
1
  gac/__init__.py,sha256=z9yGInqtycFIT3g1ca24r-A3699hKVaRqGUI79wsmMc,415
2
- gac/__version__.py,sha256=qxSKc0LY86AnPlLZUd4nru_QidvMTN0Rp7YUgpJEcxs,67
3
- gac/ai.py,sha256=-oficz6RrkPbCRB2C1Sr7JIY4WW03gGVuSAujOCJasc,6498
2
+ gac/__version__.py,sha256=FEdRQL4YfxDEwmcVMleEDpoi0wk6-1Ky9NDE0G82At4,67
3
+ gac/ai.py,sha256=vncnizPce4QbbpddjVORdK2X95rIJwWbJxmIhjscQSU,6357
4
4
  gac/cli.py,sha256=KsagQerqcf2uqGS4HjV_U1AUBtY3DPmYLsTj08riZmE,4545
5
5
  gac/config.py,sha256=wSgEDjtis7Vk1pv5VPvYmJyD9-tymDS6GiUHjnCMbIM,1486
6
6
  gac/config_cli.py,sha256=v9nFHZO1RvK9fzHyuUS6SG-BCLHMsdOMDwWamBhVVh4,1608
@@ -13,8 +13,8 @@ gac/main.py,sha256=IlT6iOsdwb0uSJJ1A69FaBrq-gFGpnhCcAjJLdHp20w,11962
13
13
  gac/preprocess.py,sha256=4igtZ9OTHgTpqwlJmbcGaqzmdD0HHCZJwsZ9eG118Gk,15360
14
14
  gac/prompt.py,sha256=Wd-CguIQnVNj_49dXz0Da2Osxx8sfTzRypx_rq2rFWk,20052
15
15
  gac/utils.py,sha256=W3ladtmsH01MNLdckQYTzYrYbTGEdzCKI36he9C-y_E,3945
16
- gac-0.17.7.dist-info/METADATA,sha256=y6g4vfzo6uRjkkzzHI5f5dMWXtbBiax6nW-A47GmKzc,8448
17
- gac-0.17.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
- gac-0.17.7.dist-info/entry_points.txt,sha256=tdjN-XMmcWfL92swuRAjT62bFLOAwk9bTMRLGP5Z4aI,36
19
- gac-0.17.7.dist-info/licenses/LICENSE,sha256=s11puNmYfzwoSwG96nhOJe268Y1QFckr8-Hmzo3_eJE,1087
20
- gac-0.17.7.dist-info/RECORD,,
16
+ gac-0.18.1.dist-info/METADATA,sha256=ZnTlQJHNf_5xWBy_o362nncpqfG7u4scdyPFdmLAqbI,8406
17
+ gac-0.18.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
+ gac-0.18.1.dist-info/entry_points.txt,sha256=tdjN-XMmcWfL92swuRAjT62bFLOAwk9bTMRLGP5Z4aI,36
19
+ gac-0.18.1.dist-info/licenses/LICENSE,sha256=s11puNmYfzwoSwG96nhOJe268Y1QFckr8-Hmzo3_eJE,1087
20
+ gac-0.18.1.dist-info/RECORD,,
File without changes