Documentation

Thought Remover

The Thought Remover component processes text to remove thought-related content, with support for language models and optimization settings.

Thought Remover Component

Thought Remover interface and configuration

Component Inputs

  • LLM Response: Text input

    The text to process

  • Language Models: Model configuration

    Language model settings

  • Input: Additional input data

    Supplementary input for processing

  • Judge LLM: Model selection

    The LLM to use for judgment

  • Optimization: balanced

    Optimization strategy

Component Outputs

  • Output: Processed text

    The text with thoughts removed

  • Selected Model: Model information

    The model used for processing

  • Cleaned Message: Final output

    The cleaned message

Implementation Example

const thoughtRemover = { llmResponse: "Let me think about this... The answer is 42.", languageModels: ["gpt-4", "claude-3"], input: "Additional context", judgeLLM: "gpt-4", optimization: "balanced" }; // Output: // { // output: "The answer is 42.", // selectedModel: "gpt-4", // cleanedMessage: "The answer is 42." // }

Best Practices

  • Choose appropriate language models for your use case
  • Balance optimization settings for best results
  • Provide clear input context
  • Validate output for accuracy