Module preprocessor

Module preprocessor 

Source
Expand description

The Preprocessor consists of the following modules

  • translation: This module converts the allowed Ingress message types to the corresponding internal representation.
  • apply: This module applies ModelConfig defaults to any empty optional fields specified
  • prompt: This module applies any prompt template logic to the internal Request object.
  • tokenize: This module tokenizes the formatted prompt string and returns the token ids.

The Preprocessor will accept any IngressRequest and transform it to a BackendRequest.

Re-exports§

pub use crate::protocols::common::llm_backend::BackendOutput;
pub use crate::protocols::common::llm_backend::PreprocessedRequest;
pub use crate::protocols::common::preprocessor::PreprocessedEmbeddingRequest;

Modules§

prompt
Prompt Formatting Module
tools

Structs§

LLMMetricAnnotation
OpenAIPreprocessor

Constants§

ANNOTATION_FORMATTED_PROMPT
ANNOTATION_LLM_METRICS
ANNOTATION_TOKEN_IDS