kodit 0.3.14__py3-none-any.whl → 0.3.15__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 kodit might be problematic. Click here for more details.

kodit/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.3.14'
21
- __version_tuple__ = version_tuple = (0, 3, 14)
20
+ __version__ = version = '0.3.15'
21
+ __version_tuple__ = version_tuple = (0, 3, 15)
@@ -52,7 +52,17 @@ class OpenAIEmbeddingProvider(EmbeddingProvider):
52
52
  def _get_encoding(self) -> "Encoding":
53
53
  """Return (and cache) the tiktoken encoding for the chosen model."""
54
54
  if self._encoding is None:
55
- self._encoding = tiktoken.encoding_for_model(self.model_name)
55
+ try:
56
+ self._encoding = tiktoken.encoding_for_model(self.model_name)
57
+ except KeyError:
58
+ # If the model is not supported by tiktoken, use a default encoding
59
+ self.log.info(
60
+ "Model not supported by tiktoken, using default encoding",
61
+ model_name=self.model_name,
62
+ default_encoding="o200k_base",
63
+ )
64
+ self._encoding = tiktoken.get_encoding("o200k_base")
65
+
56
66
  return self._encoding
57
67
 
58
68
  def _split_sub_batches(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kodit
3
- Version: 0.3.14
3
+ Version: 0.3.15
4
4
  Summary: Code indexing for better AI code generation
5
5
  Project-URL: Homepage, https://docs.helixml.tech/kodit/
6
6
  Project-URL: Documentation, https://docs.helixml.tech/kodit/
@@ -1,6 +1,6 @@
1
1
  kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
2
2
  kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
3
- kodit/_version.py,sha256=dAYECGus8vEags4_X66QYJmiBFCY-yJJXDyexsFv72w,513
3
+ kodit/_version.py,sha256=HSn5cGZLA_vnXREa9sRtSYCA5Ii9CJlQbi1YMzsfUGM,513
4
4
  kodit/app.py,sha256=aK6TP-7L3aHCiatNm_SYSw0zU4G3EuOcvdBZ3xPHO_U,3917
5
5
  kodit/cli.py,sha256=ZOS_VzCHGjJRZzZpaVR00QXSPIwRXPYu-pTrbEtlyR0,19328
6
6
  kodit/config.py,sha256=kuGdl-q5r9b7spt89-1mfVNuoQLqkXQ9-nuJFfRflUU,8940
@@ -57,7 +57,7 @@ kodit/infrastructure/embedding/embedding_providers/__init__.py,sha256=qeZ-oAIAxM
57
57
  kodit/infrastructure/embedding/embedding_providers/batching.py,sha256=a8CL9PX2VLmbeg616fc_lQzfC4BWTVn32m4SEhXpHxc,3279
58
58
  kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py,sha256=V6OdCuWyQQOvo3OJGRi-gBKDApIcrELydFg7T696P5s,2257
59
59
  kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py,sha256=9aLV1Zg4KMhYWlGRwgAUtswW4aIabNqbsipWhAn64RI,4133
60
- kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py,sha256=QfvdXXbWa-1DQriCzV-TmFm3XGqnVP_7PSQ6u6fKnuw,3973
60
+ kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py,sha256=EBNBwme-n9WROSmjgjLYWwGbFc7AvTg6-IZ4fci2XVQ,4404
61
61
  kodit/infrastructure/enrichment/__init__.py,sha256=8acZKNzql8Fs0lceFu9U3KoUrOptRBtVIxr_Iw6lz3Y,40
62
62
  kodit/infrastructure/enrichment/enrichment_factory.py,sha256=_JWkna3g8q8hzaPq1NRfZU9Y_sv99xcloM4BCJAWmHw,2039
63
63
  kodit/infrastructure/enrichment/local_enrichment_provider.py,sha256=7Vlwu1jPJ5KNUn1a51M1P-laUd5YVFJA8EeH6KO-95k,3960
@@ -95,8 +95,8 @@ kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py,sha256=r7ukmJ_axX
95
95
  kodit/utils/__init__.py,sha256=DPEB1i8evnLF4Ns3huuAYg-0pKBFKUFuiDzOKG9r-sw,33
96
96
  kodit/utils/dump_openapi.py,sha256=29VdjHpNSaGAg7RjQw0meq1OLhljCx1ElgBlTC8xoF4,1247
97
97
  kodit/utils/path_utils.py,sha256=thK6YGGNvQThdBaCYCCeCvS1L8x-lwl3AoGht2jnjGw,1645
98
- kodit-0.3.14.dist-info/METADATA,sha256=H9I5v4D4kVAJnF1-ofQZpxvMif86Vn-CNNWGvV9VI7M,7672
99
- kodit-0.3.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
- kodit-0.3.14.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
101
- kodit-0.3.14.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
102
- kodit-0.3.14.dist-info/RECORD,,
98
+ kodit-0.3.15.dist-info/METADATA,sha256=Ao9egwccbR6lQS0KqkSeS8gym88pE6SzTFVEOhYQnRE,7672
99
+ kodit-0.3.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
+ kodit-0.3.15.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
101
+ kodit-0.3.15.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
102
+ kodit-0.3.15.dist-info/RECORD,,
File without changes