logdetective 2.5.0__py3-none-any.whl → 2.6.0__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.
- logdetective/prompts-summary-first.yml +0 -2
- logdetective/prompts.yml +0 -3
- logdetective/server/database/base.py +5 -2
- logdetective/server/database/models/__init__.py +2 -2
- logdetective/server/database/models/koji.py +15 -9
- logdetective/server/database/models/merge_request_jobs.py +42 -22
- logdetective/server/database/models/metrics.py +25 -13
- logdetective/server/templates/gitlab_full_comment.md.j2 +7 -7
- logdetective/server/templates/gitlab_short_comment.md.j2 +7 -7
- {logdetective-2.5.0.dist-info → logdetective-2.6.0.dist-info}/METADATA +15 -1
- {logdetective-2.5.0.dist-info → logdetective-2.6.0.dist-info}/RECORD +14 -14
- {logdetective-2.5.0.dist-info → logdetective-2.6.0.dist-info}/WHEEL +0 -0
- {logdetective-2.5.0.dist-info → logdetective-2.6.0.dist-info}/entry_points.txt +0 -0
- {logdetective-2.5.0.dist-info → logdetective-2.6.0.dist-info}/licenses/LICENSE +0 -0
logdetective/prompts.yml
CHANGED
|
@@ -19,7 +19,6 @@ prompt_template: |
|
|
|
19
19
|
|
|
20
20
|
{}
|
|
21
21
|
|
|
22
|
-
Analysis:
|
|
23
22
|
|
|
24
23
|
snippet_prompt_template: |
|
|
25
24
|
Analyse following RPM build log snippet. Describe contents accurately, without speculation or suggestions for resolution
|
|
@@ -30,7 +29,6 @@ snippet_prompt_template: |
|
|
|
30
29
|
|
|
31
30
|
{}
|
|
32
31
|
|
|
33
|
-
Analysis:
|
|
34
32
|
|
|
35
33
|
prompt_template_staged: |
|
|
36
34
|
Given following log snippets, their explanation, and nothing else, explain what failure, if any, occurred during build of this package.
|
|
@@ -47,7 +45,6 @@ prompt_template_staged: |
|
|
|
47
45
|
|
|
48
46
|
{}
|
|
49
47
|
|
|
50
|
-
Analysis:
|
|
51
48
|
|
|
52
49
|
# System prompts
|
|
53
50
|
# System prompts are meant to serve as general guide for model behavior,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from os import getenv
|
|
2
2
|
from contextlib import asynccontextmanager
|
|
3
|
-
from sqlalchemy.orm import
|
|
3
|
+
from sqlalchemy.orm import DeclarativeBase
|
|
4
4
|
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker
|
|
5
5
|
from logdetective import logger
|
|
6
6
|
|
|
@@ -24,7 +24,10 @@ sqlalchemy_echo = getenv("SQLALCHEMY_ECHO", "False").lower() in (
|
|
|
24
24
|
)
|
|
25
25
|
engine = create_async_engine(get_pg_url(), echo=sqlalchemy_echo)
|
|
26
26
|
SessionFactory = async_sessionmaker(autoflush=True, bind=engine) # pylint: disable=invalid-name
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Base(DeclarativeBase):
|
|
30
|
+
"""Declarative base class for all ORM models."""
|
|
28
31
|
|
|
29
32
|
|
|
30
33
|
@asynccontextmanager
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from logdetective.server.database.base import Base
|
|
2
1
|
from logdetective.server.database.models.merge_request_jobs import (
|
|
3
2
|
Forge,
|
|
4
3
|
GitlabMergeRequestJobs,
|
|
@@ -18,8 +17,9 @@ from logdetective.server.database.models.exceptions import (
|
|
|
18
17
|
KojiTaskAnalysisTimeoutError,
|
|
19
18
|
)
|
|
20
19
|
|
|
20
|
+
# pylint: disable=undefined-all-variable
|
|
21
|
+
|
|
21
22
|
__all__ = [
|
|
22
|
-
Base.__name__,
|
|
23
23
|
GitlabMergeRequestJobs.__name__,
|
|
24
24
|
Comments.__name__,
|
|
25
25
|
Reactions.__name__,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Optional
|
|
1
3
|
from datetime import datetime, timedelta, timezone
|
|
2
|
-
from sqlalchemy import
|
|
3
|
-
from sqlalchemy.orm import relationship
|
|
4
|
+
from sqlalchemy import BigInteger, DateTime, ForeignKey, Integer, String, select
|
|
5
|
+
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
6
|
+
|
|
4
7
|
from sqlalchemy.exc import OperationalError
|
|
5
8
|
import backoff
|
|
6
9
|
|
|
@@ -21,25 +24,28 @@ class KojiTaskAnalysis(Base):
|
|
|
21
24
|
|
|
22
25
|
__tablename__ = "koji_task_analysis"
|
|
23
26
|
|
|
24
|
-
id =
|
|
25
|
-
koji_instance =
|
|
26
|
-
task_id =
|
|
27
|
-
log_file_name =
|
|
28
|
-
request_received_at =
|
|
27
|
+
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
|
28
|
+
koji_instance: Mapped[str] = mapped_column(String(255), nullable=False, index=True)
|
|
29
|
+
task_id: Mapped[int] = mapped_column(BigInteger, nullable=False, index=True, unique=True)
|
|
30
|
+
log_file_name: Mapped[str] = mapped_column(String(255), nullable=False, index=True)
|
|
31
|
+
request_received_at: Mapped[datetime] = mapped_column(
|
|
29
32
|
DateTime(timezone=True),
|
|
30
33
|
nullable=False,
|
|
31
34
|
index=True,
|
|
32
35
|
default=datetime.now(timezone.utc),
|
|
33
36
|
comment="Timestamp when the request was received",
|
|
34
37
|
)
|
|
35
|
-
response_id =
|
|
38
|
+
response_id: Mapped[Optional[int]] = mapped_column(
|
|
36
39
|
Integer,
|
|
37
40
|
ForeignKey("analyze_request_metrics.id"),
|
|
38
41
|
nullable=True,
|
|
39
42
|
index=False,
|
|
40
43
|
comment="The id of the analyze request metrics for this task",
|
|
41
44
|
)
|
|
42
|
-
response = relationship(
|
|
45
|
+
response: Mapped[Optional["AnalyzeRequestMetrics"]] = relationship(
|
|
46
|
+
"AnalyzeRequestMetrics",
|
|
47
|
+
back_populates="koji_tasks"
|
|
48
|
+
)
|
|
43
49
|
|
|
44
50
|
@classmethod
|
|
45
51
|
@backoff.on_exception(backoff.expo, OperationalError, max_tries=DB_MAX_RETRIES)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
import enum
|
|
2
3
|
import datetime
|
|
3
|
-
from typing import Optional, List, Tuple, Self
|
|
4
|
+
from typing import Optional, List, Tuple, Self, TYPE_CHECKING
|
|
4
5
|
|
|
5
6
|
import backoff
|
|
6
7
|
|
|
7
8
|
from sqlalchemy import (
|
|
8
9
|
Enum,
|
|
9
|
-
Column,
|
|
10
10
|
BigInteger,
|
|
11
11
|
DateTime,
|
|
12
12
|
String,
|
|
@@ -15,12 +15,16 @@ from sqlalchemy import (
|
|
|
15
15
|
desc,
|
|
16
16
|
select,
|
|
17
17
|
)
|
|
18
|
-
from sqlalchemy.orm import relationship
|
|
18
|
+
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
19
19
|
from sqlalchemy.engine import Row
|
|
20
20
|
from sqlalchemy.exc import OperationalError
|
|
21
21
|
from logdetective.server.database.base import Base, transaction, DB_MAX_RETRIES
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
if TYPE_CHECKING:
|
|
25
|
+
from .metrics import AnalyzeRequestMetrics
|
|
26
|
+
|
|
27
|
+
|
|
24
28
|
class Forge(str, enum.Enum):
|
|
25
29
|
"""List of forges managed by logdetective"""
|
|
26
30
|
|
|
@@ -35,21 +39,26 @@ class GitlabMergeRequestJobs(Base):
|
|
|
35
39
|
|
|
36
40
|
__tablename__ = "gitlab_merge_request_jobs"
|
|
37
41
|
|
|
38
|
-
id =
|
|
39
|
-
forge
|
|
40
|
-
|
|
42
|
+
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
|
43
|
+
forge: Mapped[Forge] = mapped_column(
|
|
44
|
+
Enum(Forge),
|
|
45
|
+
nullable=False,
|
|
46
|
+
index=True,
|
|
47
|
+
comment="The forge name"
|
|
48
|
+
)
|
|
49
|
+
project_id: Mapped[int] = mapped_column(
|
|
41
50
|
BigInteger,
|
|
42
51
|
nullable=False,
|
|
43
52
|
index=True,
|
|
44
53
|
comment="The project gitlab id",
|
|
45
54
|
)
|
|
46
|
-
mr_iid =
|
|
55
|
+
mr_iid: Mapped[int] = mapped_column(
|
|
47
56
|
BigInteger,
|
|
48
57
|
nullable=False,
|
|
49
58
|
index=False,
|
|
50
59
|
comment="The merge request gitlab iid",
|
|
51
60
|
)
|
|
52
|
-
job_id =
|
|
61
|
+
job_id: Mapped[int] = mapped_column(
|
|
53
62
|
BigInteger,
|
|
54
63
|
nullable=False,
|
|
55
64
|
index=True,
|
|
@@ -63,11 +72,14 @@ class GitlabMergeRequestJobs(Base):
|
|
|
63
72
|
),
|
|
64
73
|
)
|
|
65
74
|
|
|
66
|
-
comment = relationship(
|
|
75
|
+
comment: Mapped[List["Comments"]] = relationship(
|
|
67
76
|
"Comments", back_populates="merge_request_job", uselist=False
|
|
68
77
|
) # 1 comment for 1 job
|
|
69
78
|
|
|
70
|
-
request_metrics
|
|
79
|
+
request_metrics: Mapped[List["AnalyzeRequestMetrics"]] = relationship(
|
|
80
|
+
"AnalyzeRequestMetrics",
|
|
81
|
+
back_populates="mr_job"
|
|
82
|
+
)
|
|
71
83
|
|
|
72
84
|
@classmethod
|
|
73
85
|
@backoff.on_exception(backoff.expo, OperationalError, max_tries=DB_MAX_RETRIES)
|
|
@@ -183,8 +195,8 @@ class Comments(Base):
|
|
|
183
195
|
|
|
184
196
|
__tablename__ = "comments"
|
|
185
197
|
|
|
186
|
-
id =
|
|
187
|
-
merge_request_job_id =
|
|
198
|
+
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
|
199
|
+
merge_request_job_id: Mapped[int] = mapped_column(
|
|
188
200
|
BigInteger,
|
|
189
201
|
ForeignKey("gitlab_merge_request_jobs.id"),
|
|
190
202
|
nullable=False,
|
|
@@ -192,14 +204,19 @@ class Comments(Base):
|
|
|
192
204
|
index=True,
|
|
193
205
|
comment="The associated merge request job (db) id",
|
|
194
206
|
)
|
|
195
|
-
forge
|
|
196
|
-
|
|
207
|
+
forge: Mapped[Forge] = mapped_column(
|
|
208
|
+
Enum(Forge),
|
|
209
|
+
nullable=False,
|
|
210
|
+
index=True,
|
|
211
|
+
comment="The forge name"
|
|
212
|
+
)
|
|
213
|
+
comment_id: Mapped[str] = mapped_column(
|
|
197
214
|
String(50), # e.g. 'd5a3ff139356ce33e37e73add446f16869741b50'
|
|
198
215
|
nullable=False,
|
|
199
216
|
index=True,
|
|
200
217
|
comment="The comment gitlab id",
|
|
201
218
|
)
|
|
202
|
-
created_at =
|
|
219
|
+
created_at: Mapped[datetime.datetime] = mapped_column(
|
|
203
220
|
DateTime(timezone=True),
|
|
204
221
|
nullable=False,
|
|
205
222
|
comment="Timestamp when the comment was created",
|
|
@@ -209,8 +226,11 @@ class Comments(Base):
|
|
|
209
226
|
UniqueConstraint("forge", "comment_id", name="uix_forge_comment_id"),
|
|
210
227
|
)
|
|
211
228
|
|
|
212
|
-
merge_request_job
|
|
213
|
-
|
|
229
|
+
merge_request_job: Mapped["GitlabMergeRequestJobs"] = relationship(
|
|
230
|
+
"GitlabMergeRequestJobs",
|
|
231
|
+
back_populates="comment"
|
|
232
|
+
)
|
|
233
|
+
reactions: Mapped[list["Reactions"]] = relationship("Reactions", back_populates="comment")
|
|
214
234
|
|
|
215
235
|
@classmethod
|
|
216
236
|
@backoff.on_exception(backoff.expo, OperationalError, max_tries=DB_MAX_RETRIES)
|
|
@@ -408,20 +428,20 @@ class Reactions(Base):
|
|
|
408
428
|
|
|
409
429
|
__tablename__ = "reactions"
|
|
410
430
|
|
|
411
|
-
id =
|
|
412
|
-
comment_id =
|
|
431
|
+
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
|
432
|
+
comment_id: Mapped[int] = mapped_column(
|
|
413
433
|
BigInteger,
|
|
414
434
|
ForeignKey("comments.id"),
|
|
415
435
|
nullable=False,
|
|
416
436
|
index=True,
|
|
417
437
|
comment="The associated comment (db) id",
|
|
418
438
|
)
|
|
419
|
-
reaction_type =
|
|
439
|
+
reaction_type: Mapped[str] = mapped_column(
|
|
420
440
|
String(127), # e.g. 'thumbs-up'
|
|
421
441
|
nullable=False,
|
|
422
442
|
comment="The type of reaction",
|
|
423
443
|
)
|
|
424
|
-
count =
|
|
444
|
+
count: Mapped[int] = mapped_column(
|
|
425
445
|
BigInteger,
|
|
426
446
|
nullable=False,
|
|
427
447
|
comment="The number of reactions, of this type, given in the comment",
|
|
@@ -431,7 +451,7 @@ class Reactions(Base):
|
|
|
431
451
|
UniqueConstraint("comment_id", "reaction_type", name="uix_comment_reaction"),
|
|
432
452
|
)
|
|
433
453
|
|
|
434
|
-
comment = relationship("Comments", back_populates="reactions")
|
|
454
|
+
comment: Mapped["Comments"] = relationship("Comments", back_populates="reactions")
|
|
435
455
|
|
|
436
456
|
@classmethod
|
|
437
457
|
@backoff.on_exception(backoff.expo, OperationalError, max_tries=DB_MAX_RETRIES)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
1
2
|
import io
|
|
2
3
|
import enum
|
|
3
4
|
import datetime
|
|
4
|
-
from typing import Optional, List, Self, Tuple
|
|
5
|
+
from typing import Optional, List, Self, Tuple, TYPE_CHECKING
|
|
5
6
|
|
|
6
7
|
import backoff
|
|
7
8
|
|
|
8
9
|
from sqlalchemy import (
|
|
9
|
-
Column,
|
|
10
10
|
Integer,
|
|
11
11
|
Float,
|
|
12
12
|
DateTime,
|
|
@@ -17,7 +17,7 @@ from sqlalchemy import (
|
|
|
17
17
|
ForeignKey,
|
|
18
18
|
LargeBinary,
|
|
19
19
|
)
|
|
20
|
-
from sqlalchemy.orm import relationship, aliased
|
|
20
|
+
from sqlalchemy.orm import Mapped, mapped_column, relationship, aliased
|
|
21
21
|
from sqlalchemy.exc import OperationalError
|
|
22
22
|
|
|
23
23
|
from logdetective.server.database.base import Base, transaction, DB_MAX_RETRIES
|
|
@@ -27,6 +27,10 @@ from logdetective.server.database.models.merge_request_jobs import (
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
if TYPE_CHECKING:
|
|
31
|
+
from .koji import KojiTaskAnalysis
|
|
32
|
+
|
|
33
|
+
|
|
30
34
|
class EndpointType(enum.Enum):
|
|
31
35
|
"""Different analyze endpoints"""
|
|
32
36
|
|
|
@@ -42,45 +46,45 @@ class AnalyzeRequestMetrics(Base):
|
|
|
42
46
|
|
|
43
47
|
__tablename__ = "analyze_request_metrics"
|
|
44
48
|
|
|
45
|
-
id =
|
|
46
|
-
endpoint =
|
|
49
|
+
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
|
50
|
+
endpoint: Mapped[EndpointType] = mapped_column(
|
|
47
51
|
Enum(EndpointType),
|
|
48
52
|
nullable=False,
|
|
49
53
|
index=True,
|
|
50
54
|
comment="The service endpoint that was called",
|
|
51
55
|
)
|
|
52
|
-
request_received_at =
|
|
56
|
+
request_received_at: Mapped[datetime.datetime] = mapped_column(
|
|
53
57
|
DateTime(timezone=True),
|
|
54
58
|
nullable=False,
|
|
55
59
|
index=True,
|
|
56
60
|
default=datetime.datetime.now(datetime.timezone.utc),
|
|
57
61
|
comment="Timestamp when the request was received",
|
|
58
62
|
)
|
|
59
|
-
compressed_log =
|
|
63
|
+
compressed_log: Mapped[bytes] = mapped_column(
|
|
60
64
|
LargeBinary(length=314572800), # 300MB limit (300 * 1024 * 1024)
|
|
61
65
|
nullable=False,
|
|
62
66
|
index=False,
|
|
63
67
|
comment="Log processed, saved in a zip format",
|
|
64
68
|
)
|
|
65
|
-
compressed_response =
|
|
69
|
+
compressed_response: Mapped[Optional[bytes]] = mapped_column(
|
|
66
70
|
LargeBinary(length=314572800), # 300MB limit (300 * 1024 * 1024)
|
|
67
71
|
nullable=True,
|
|
68
72
|
index=False,
|
|
69
73
|
comment="Given response (with explanation and snippets) saved in a zip format",
|
|
70
74
|
)
|
|
71
|
-
response_sent_at =
|
|
75
|
+
response_sent_at: Mapped[Optional[datetime.datetime]] = mapped_column(
|
|
72
76
|
DateTime(timezone=True),
|
|
73
77
|
nullable=True,
|
|
74
78
|
comment="Timestamp when the response was sent back",
|
|
75
79
|
)
|
|
76
|
-
response_length =
|
|
80
|
+
response_length: Mapped[Optional[int]] = mapped_column(
|
|
77
81
|
Integer, nullable=True, comment="Length of the response in chars"
|
|
78
82
|
)
|
|
79
|
-
response_certainty =
|
|
83
|
+
response_certainty: Mapped[Optional[float]] = mapped_column(
|
|
80
84
|
Float, nullable=True, comment="Certainty for generated response"
|
|
81
85
|
)
|
|
82
86
|
|
|
83
|
-
merge_request_job_id =
|
|
87
|
+
merge_request_job_id: Mapped[Optional[int]] = mapped_column(
|
|
84
88
|
Integer,
|
|
85
89
|
ForeignKey("gitlab_merge_request_jobs.id"),
|
|
86
90
|
nullable=True,
|
|
@@ -88,7 +92,15 @@ class AnalyzeRequestMetrics(Base):
|
|
|
88
92
|
comment="Is this an analyze request coming from a merge request?",
|
|
89
93
|
)
|
|
90
94
|
|
|
91
|
-
mr_job
|
|
95
|
+
mr_job: Mapped[Optional["GitlabMergeRequestJobs"]] = relationship(
|
|
96
|
+
"GitlabMergeRequestJobs",
|
|
97
|
+
back_populates="request_metrics"
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
koji_tasks: Mapped[List["KojiTaskAnalysis"]] = relationship(
|
|
101
|
+
"KojiTaskAnalysis",
|
|
102
|
+
back_populates="response"
|
|
103
|
+
)
|
|
92
104
|
|
|
93
105
|
@classmethod
|
|
94
106
|
@backoff.on_exception(backoff.expo, OperationalError, max_tries=DB_MAX_RETRIES)
|
|
@@ -57,15 +57,15 @@ Please know that the explanation was provided by AI and may be incorrect.
|
|
|
57
57
|
</li>
|
|
58
58
|
</ul>
|
|
59
59
|
</details>
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
|
|
61
|
+
<hr>
|
|
62
|
+
|
|
63
|
+
This comment was created by <a href="https://logdetective.com">Log Detective</a>.
|
|
62
64
|
Was the provided feedback accurate and helpful?
|
|
63
65
|
<br>
|
|
64
66
|
Please vote with :thumbsup:
|
|
65
67
|
or :thumbsdown: to help us improve.
|
|
66
68
|
<br>
|
|
67
|
-
<i>If this Log Detective report contains harmful content,
|
|
68
|
-
|
|
69
|
-
and contact the
|
|
70
|
-
[log-detective]: https://log-detective.com/
|
|
71
|
-
[contact]: https://github.com/fedora-copr
|
|
69
|
+
<i>If this Log Detective report contains harmful content,
|
|
70
|
+
please use the <a href="https://docs.gitlab.com/user/report_abuse/">Gitlab reporting feature for harmful content</a>
|
|
71
|
+
and contact the <a href="https://github.com/fedora-copr/logdetective/issues">Log Detective developers</a>.</i>
|
|
@@ -46,15 +46,15 @@ Please know that the explanation was provided by AI and may be incorrect.
|
|
|
46
46
|
</li>
|
|
47
47
|
</ul>
|
|
48
48
|
</details>
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
<hr>
|
|
51
|
+
|
|
52
|
+
This comment was created by <a href="https://logdetective.com">Log Detective</a>.
|
|
51
53
|
Was the provided feedback accurate and helpful?
|
|
52
54
|
<br>
|
|
53
55
|
Please vote with :thumbsup:
|
|
54
56
|
or :thumbsdown: to help us improve.
|
|
55
57
|
<br>
|
|
56
|
-
<i>If this Log Detective report contains harmful content,
|
|
57
|
-
|
|
58
|
-
and contact the
|
|
59
|
-
[log-detective]: https://log-detective.com/
|
|
60
|
-
[contact]: https://github.com/fedora-copr
|
|
58
|
+
<i>If this Log Detective report contains harmful content,
|
|
59
|
+
please use the <a href="https://docs.gitlab.com/user/report_abuse/">Gitlab reporting feature for harmful content</a>
|
|
60
|
+
and contact the <a href="https://github.com/fedora-copr/logdetective/issues">Log Detective developers</a>.</i>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: logdetective
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
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
|
|
@@ -128,6 +128,20 @@ Note that streaming with some models (notably Meta-Llama-3) is broken and can be
|
|
|
128
128
|
|
|
129
129
|
logdetective https://example.com/logs.txt --model QuantFactory/Meta-Llama-3-8B-Instruct-GGUF --filename_suffix Q5_K_M.gguf --no-stream
|
|
130
130
|
|
|
131
|
+
Choice of LLM
|
|
132
|
+
-------------
|
|
133
|
+
|
|
134
|
+
While Log Detective is compatible with a wide range of LLMs, it does require an instruction tuned model to function properly.
|
|
135
|
+
|
|
136
|
+
Whether or not the model has been trained to work with instructions can be determined by examining the model card, or simply by checking if it has `instruct` in its name.
|
|
137
|
+
|
|
138
|
+
When deployed as a server, Log Detective uses `/chat/completions` API as defined by OpenAI. The API must support both `system` and `user` roles, in order to properly work with a system prompt.
|
|
139
|
+
|
|
140
|
+
Configuration fields `system_role` and `user_role` can be used to set role names for APIs with non-standard roles.
|
|
141
|
+
|
|
142
|
+
> **Note:**
|
|
143
|
+
> In cases when no system role is available, it is possible to set both fields to the same value. This will concatenate system and standard prompt.
|
|
144
|
+
> This may have negative impact coherence of response.
|
|
131
145
|
|
|
132
146
|
Real Example
|
|
133
147
|
------------
|
|
@@ -4,20 +4,20 @@ logdetective/drain3.ini,sha256=ni91eCT1TwTznZwcqWoOVMQcGEnWhEDNCoTPF7cfGfY,1360
|
|
|
4
4
|
logdetective/extractors.py,sha256=vT-je4NkDgSj9rRtSeLpqBU52gIUnnVgJPHFbVihpCw,5993
|
|
5
5
|
logdetective/logdetective.py,sha256=Ck7TL3YvdQG8zniudM8bM51LfTyVW6Ea3BarTjzjWHo,6606
|
|
6
6
|
logdetective/models.py,sha256=uczmQtWFgSp_ZGssngdTM4qzPF1o64dCy0469GoSbjQ,2937
|
|
7
|
-
logdetective/prompts-summary-first.yml,sha256=
|
|
7
|
+
logdetective/prompts-summary-first.yml,sha256=kmyMFQmqFXpojkz7p3CyCWCPxMpFLpfDdMGisB4YwL0,808
|
|
8
8
|
logdetective/prompts-summary-only.yml,sha256=8U9AMJV8ePW-0CoXOXlQoO92DAJDeutIT8ntSkkm6W0,470
|
|
9
|
-
logdetective/prompts.yml,sha256=
|
|
9
|
+
logdetective/prompts.yml,sha256=i3z6Jcb4ScVi7LsxOpDlKiXrcvql3qO_JnLzkAKMn1c,3870
|
|
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
13
|
logdetective/server/config.py,sha256=cKUmNCJyNyEid0bPTiUjr8CQuBYBab5bC79Axk2h0z8,2525
|
|
14
14
|
logdetective/server/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
logdetective/server/database/base.py,sha256=
|
|
16
|
-
logdetective/server/database/models/__init__.py,sha256=
|
|
15
|
+
logdetective/server/database/base.py,sha256=HSV2tgye7iYTDzJD1Q5X7_nlLuTMIFP-hRVQMYxngHQ,2073
|
|
16
|
+
logdetective/server/database/models/__init__.py,sha256=zoZMCt1_7tewDa6eEIIX_xrdN-tLegSiPNg5NiYaV3o,850
|
|
17
17
|
logdetective/server/database/models/exceptions.py,sha256=AXQPZRgt-r2vboxP9SGYelngP6YIFpHlwELKcZ1FD3Y,384
|
|
18
|
-
logdetective/server/database/models/koji.py,sha256=
|
|
19
|
-
logdetective/server/database/models/merge_request_jobs.py,sha256=
|
|
20
|
-
logdetective/server/database/models/metrics.py,sha256=
|
|
18
|
+
logdetective/server/database/models/koji.py,sha256=3soiJQ3L-H09cVO-BeRDEcP-HrSa-Z6qp3kwePUZsbo,6216
|
|
19
|
+
logdetective/server/database/models/merge_request_jobs.py,sha256=MxiAVKQIsQMbFylBsmYBmVXYvid-4_5mwwXLfWdp6_w,19965
|
|
20
|
+
logdetective/server/database/models/metrics.py,sha256=zzTRo67qwLyDj1GKbclZm1UXt1nNU-G662-y5XyGshE,15458
|
|
21
21
|
logdetective/server/emoji.py,sha256=CoaAiZA_JgtUJe41YOsQRqd_QpgVeQ8szJt_bQ3d_JM,4837
|
|
22
22
|
logdetective/server/exceptions.py,sha256=piV7wVKc-rw_pHrThbZbUjtmjuO5qUbjVNFwjdfcP3Q,864
|
|
23
23
|
logdetective/server/gitlab.py,sha256=putpnf8PfGsCZJsqWZA1rMovRGnyagoQmgpKLqtA-aQ,16743
|
|
@@ -28,13 +28,13 @@ logdetective/server/models.py,sha256=BoiiUYI6BcVDOqtIcUgNRsCyjcWNCKyEfVtYOLYgr1Y
|
|
|
28
28
|
logdetective/server/plot.py,sha256=lFKOTXlLJ3aZtZGYXceA4OqUt1z18BpLITTI39fOMx4,14685
|
|
29
29
|
logdetective/server/server.py,sha256=Qx8mqkrRq-nlOnmOmICbaXxUWq2J60K4dHKiJtQJuE0,24938
|
|
30
30
|
logdetective/server/templates/base_response.html.j2,sha256=BJGGV_Xb0Lnue8kq32oG9lI5CQDf9vce7HMYsP-Pvb4,2040
|
|
31
|
-
logdetective/server/templates/gitlab_full_comment.md.j2,sha256=
|
|
32
|
-
logdetective/server/templates/gitlab_short_comment.md.j2,sha256=
|
|
31
|
+
logdetective/server/templates/gitlab_full_comment.md.j2,sha256=hSWEj_a7KZpzfbgoPhWA9KBwa25daDCb6S3cuBqclss,2143
|
|
32
|
+
logdetective/server/templates/gitlab_short_comment.md.j2,sha256=d396HR2DJuS8XLu2FNgVAg1CrOW8_LySQX2f6opOjp8,1957
|
|
33
33
|
logdetective/server/utils.py,sha256=KiyzzUIVssBc61LhGS0QNC5EY29In3NsG9j58ZRtoNI,4104
|
|
34
34
|
logdetective/skip_snippets.yml,sha256=reGlhPPCo06nNUJWiC2LY-OJOoPdcyOB7QBTSMeh0eg,487
|
|
35
35
|
logdetective/utils.py,sha256=4B9wwaM4tyxLFtRnnTRDcGULJDonp6VoUS8HvUpIeSI,9388
|
|
36
|
-
logdetective-2.
|
|
37
|
-
logdetective-2.
|
|
38
|
-
logdetective-2.
|
|
39
|
-
logdetective-2.
|
|
40
|
-
logdetective-2.
|
|
36
|
+
logdetective-2.6.0.dist-info/METADATA,sha256=hLRUiBvOeyWn6t9qkRVEx3nLuNmysSoReXL6aFBECsg,22598
|
|
37
|
+
logdetective-2.6.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
38
|
+
logdetective-2.6.0.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
|
|
39
|
+
logdetective-2.6.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
40
|
+
logdetective-2.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|