Skip to content

Decouple the prompt builder logic for code creation from the engine class

What does this merge request do and why?

This MR upgrades and decouples the prompt builder logic for code creation from the engine class, moving it to a separate code_suggestions.processing.pre package. We can use the reimplemented PromptBuilderBase and TokenStrategyBase classes to create a separate code completion prompt builder with/without tokenizer support for token counting.

How to set up and validate locally

This MR doesn't connect the new prompt builder to the existing flow. Please, check the unit tests to get the main logic.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.

Ref #296

Edited by Alexander Chueshev

Merge request reports