logdetective 2.4.0__py3-none-any.whl → 2.4.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.
@@ -52,10 +52,11 @@ def get_log(config: Config):
52
52
  return log
53
53
 
54
54
 
55
- def get_openai_api_client(ineference_config: InferenceConfig):
55
+ def get_openai_api_client(inference_config: InferenceConfig):
56
56
  """Set up AsyncOpenAI client with default configuration."""
57
57
  return AsyncOpenAI(
58
- api_key=ineference_config.api_token, base_url=ineference_config.url
58
+ api_key=inference_config.api_token, base_url=inference_config.url,
59
+ timeout=inference_config.llm_api_timeout
59
60
  )
60
61
 
61
62
 
@@ -182,6 +182,7 @@ class InferenceConfig(BaseModel): # pylint: disable=too-many-instance-attribute
182
182
  http_timeout: float = 5.0
183
183
  user_role: str = USER_ROLE_DEFAULT
184
184
  system_role: str = SYSTEM_ROLE_DEFAULT
185
+ llm_api_timeout: float = 15.0
185
186
  _http_session: aiohttp.ClientSession = None
186
187
  _limiter: AsyncLimiter = AsyncLimiter(LLM_DEFAULT_REQUESTS_PER_MINUTE)
187
188
 
@@ -203,6 +204,7 @@ class InferenceConfig(BaseModel): # pylint: disable=too-many-instance-attribute
203
204
  self._requests_per_minute = data.get(
204
205
  "requests_per_minute", LLM_DEFAULT_REQUESTS_PER_MINUTE
205
206
  )
207
+ self.llm_api_timeout = data.get("llm_api_timeout", 15.0)
206
208
  self._limiter = AsyncLimiter(self._requests_per_minute)
207
209
 
208
210
  def __del__(self):
@@ -3,14 +3,16 @@ Please know that the explanation was provided by AI and may be incorrect.
3
3
  {% if certainty > 0 %}
4
4
  In this case, we are {{ "%.2f" | format(certainty) }}% certain of the response {{ emoji_face }}.
5
5
  {% endif %}
6
+
6
7
  <b>Snippets:</b>
8
+
7
9
  <ul>
8
- {% for snippet in snippets %}
9
- <li>
10
- <b>Line {{ snippet.line_number }}:</b> <code>{{ snippet.text }}</code>
11
- {{ snippet.explanation.text }}
12
- </li>
13
- {% endfor %}
10
+ {% for snippet in snippets %}
11
+ <li>
12
+ <b>Line {{ snippet.line_number }}:</b> <code>{{ snippet.text }}</code>
13
+ {{ snippet.explanation.text }}
14
+ </li>
15
+ {% endfor %}
14
16
  </ul>
15
17
  <details>
16
18
  <summary>Description</summary>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: logdetective
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: Log using LLM AI to search for build/test failures and provide ideas for fixing these.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -10,7 +10,7 @@ logdetective/prompts.yml,sha256=Mq8RdWgJxxhrQYgammojJkXULJNpzSLU0N_BryOxKgc,3906
10
10
  logdetective/remote_log.py,sha256=28QvdQiy7RBnd86EKCq_A75P21gSNlCbgxJe5XAe9MA,2258
11
11
  logdetective/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  logdetective/server/compressors.py,sha256=qzrT-BPSksXY6F2L6ger04GGrgdBsGOfK2YuCFRs0Q4,5427
13
- logdetective/server/config.py,sha256=Qg3Q15S-NPXEpSqGgAH41JVy4dheqKYUSEkzE-1Z05E,2478
13
+ logdetective/server/config.py,sha256=cKUmNCJyNyEid0bPTiUjr8CQuBYBab5bC79Axk2h0z8,2525
14
14
  logdetective/server/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  logdetective/server/database/base.py,sha256=1mcjEbhwLl4RalvT3oy6XVctjJoWIW3H9aI_sMWJBK8,1728
16
16
  logdetective/server/database/models/__init__.py,sha256=GQ_4vC_jahwFrqhF4UUKLRo86_ulq1uSBAF3Je31DyA,878
@@ -24,17 +24,17 @@ logdetective/server/gitlab.py,sha256=hPQICeYK1B_1BS56GIExQgEhcdS5Y6IgBCkk-eXtnDY
24
24
  logdetective/server/koji.py,sha256=LG1pRiKUFvYFRKzgQoUG3pUHfcEwMoaMNjUSMKw_pBA,5640
25
25
  logdetective/server/llm.py,sha256=bmA6LsV80OdO60q4WLoKuehuVDEYq-HhBAYcZeLfrv8,10150
26
26
  logdetective/server/metric.py,sha256=QrrX1FmMa7sc57av0P9UFOiCIFYVLs1opOWV3ObYo0s,4086
27
- logdetective/server/models.py,sha256=jUzQUszMqgOeOrH1V2ORtejGrD1Nw1sX05bsbAyFvV4,20830
27
+ logdetective/server/models.py,sha256=BoiiUYI6BcVDOqtIcUgNRsCyjcWNCKyEfVtYOLYgr1Y,20929
28
28
  logdetective/server/plot.py,sha256=C98U9prGoPkp8_t4v2dovdZuwOhSbxXSeB_K9Q2r3NE,14607
29
29
  logdetective/server/server.py,sha256=s1QtD6FYsQX7BaVi783v7sqCEk4ccqlBJHFKUQlGgWM,24684
30
30
  logdetective/server/templates/base_response.html.j2,sha256=BJGGV_Xb0Lnue8kq32oG9lI5CQDf9vce7HMYsP-Pvb4,2040
31
- logdetective/server/templates/gitlab_full_comment.md.j2,sha256=qcDowH7bSD1NmoCVIvR4AG61xQbuVpHQ9CGj9L-RwpM,2232
31
+ logdetective/server/templates/gitlab_full_comment.md.j2,sha256=eNX_ZkAAVV7nNfKe02g_1-GgbiSqim0JH4aF3anzmxE,2186
32
32
  logdetective/server/templates/gitlab_short_comment.md.j2,sha256=UpQxIgOuOO8BBF__kzFl0XlCuYmcyfN2yMz6vd4PQ2Q,2000
33
33
  logdetective/server/utils.py,sha256=7ub-Nz7LUP_idwi2_nEC4FBuY9otSBUVy9nw86-sjYc,3861
34
34
  logdetective/skip_snippets.yml,sha256=reGlhPPCo06nNUJWiC2LY-OJOoPdcyOB7QBTSMeh0eg,487
35
35
  logdetective/utils.py,sha256=9EyHKGNxtS1ObSepL-T3M43rKIxQJkFDA5yllLbS5Bs,9178
36
- logdetective-2.4.0.dist-info/METADATA,sha256=WjXnQeIgrvCKSHpNDPs5UuBQYEJfQn-3eGCyIOcgVCk,21645
37
- logdetective-2.4.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
- logdetective-2.4.0.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
39
- logdetective-2.4.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
40
- logdetective-2.4.0.dist-info/RECORD,,
36
+ logdetective-2.4.1.dist-info/METADATA,sha256=wBT_T5szJE3Xnn76UvC4drCacVhgCaBQ0QZkrBbpjnk,21645
37
+ logdetective-2.4.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
+ logdetective-2.4.1.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
39
+ logdetective-2.4.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
40
+ logdetective-2.4.1.dist-info/RECORD,,