Package io.github.jbastgen.stemma.app.ai
Class CommitSummarizer
java.lang.Object
io.github.jbastgen.stemma.app.ai.CommitSummarizer
Describes commits with the AI connection and remembers the answers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA running description: wait forCommitSummarizer.Task.result()orCommitSummarizer.Task.cancel(). -
Constructor Summary
ConstructorsConstructorDescriptionCommitSummarizer(AiService ai, SummaryCache cache) A summarizer that answers in the language of the prompt template.CommitSummarizer(AiService ai, SummaryCache cache, Supplier<String> language) -
Method Summary
Modifier and TypeMethodDescriptioncache()The cache of summaries.A description that was asked for before, if the model and the template are still the same.describe(String repo, String branch, List<CommitData> data) Builds the prompt fromdata, asks, reads the answer and remembers it.Asdescribe(String, String, List); a local tool runs inrepository, the repository's folder.
-
Constructor Details
-
CommitSummarizer
A summarizer that answers in the language of the prompt template. -
CommitSummarizer
- Parameters:
language- the English name of the language the descriptions are written in (the language of the interface), or empty
-
-
Method Details
-
cache
The cache of summaries. -
cached
A description that was asked for before, if the model and the template are still the same. -
describe
Builds the prompt fromdata, asks, reads the answer and remembers it. -
describe
public CommitSummarizer.Task describe(String repo, String branch, List<CommitData> data, Path repository) Asdescribe(String, String, List); a local tool runs inrepository, the repository's folder.
-