VLM Style Rewriter:
The VLMStyleRewriter is a specialized node designed to enhance and transform text by rewriting it according to specific stylistic guidelines. This node is particularly useful in scenarios where you need to adapt existing text for different contexts or audiences, such as making it more cinematic, technical, narrative, artistic, or documentary in style. It leverages advanced text models like Qwen2.5 to perform these transformations, ensuring that the rewritten text aligns with the desired style while maintaining the original message's integrity. The node is ideal for the second round of a two-round processing system, where the first round involves analyzing an image using a vision model, and the second round focuses on refining the text output for specific use cases. By using this node, you can achieve more polished and contextually appropriate text outputs, enhancing the overall quality and effectiveness of your AI-generated content.
VLM Style Rewriter Input Parameters:
context
The context parameter provides the necessary environment or session information required for the node to operate. It is essential for maintaining state and ensuring that the text rewriting process is consistent with the ongoing session's requirements. This parameter does not have specific minimum or maximum values as it is typically managed by the system.
input_text
The input_text parameter is the original text that you want to rewrite. It serves as the foundation for the transformation process, and its content will be modified according to the specified style and instructions. There are no restrictions on the length of the input text, but longer texts may require more processing time.
rewrite_instruction
The rewrite_instruction parameter allows you to provide specific guidance on how the text should be rewritten. This can include particular changes or emphasis you want to be applied to the text. The instructions should be clear and concise to ensure the desired outcome.
style
The style parameter determines the stylistic approach used for rewriting the text. Options include "cinematic," "technical," "narrative," "artistic," "documentary," and "custom." Each style option applies a different set of guidelines to the text, influencing its tone and structure. The "custom" option allows you to use your own instructions without predefined guidance.
max_tokens
The max_tokens parameter specifies the maximum number of tokens (words or word parts) that the rewritten text can contain. This helps control the length of the output and ensures it remains within a manageable size. The exact range of values depends on the capabilities of the underlying text model.
temperature
The temperature parameter controls the randomness of the text generation process. A lower temperature results in more deterministic outputs, while a higher temperature introduces more variability and creativity. The value typically ranges from 0.0 to 1.0, with a default value around 0.7 for balanced creativity and coherence.
system_prompt
The system_prompt parameter provides a predefined prompt that sets the context for the text rewriting process. If not specified, a default prompt is used, which positions the system as an expert in rewriting text for specific purposes. This parameter helps guide the model's behavior and focus during the rewriting task.
trigger_word
The trigger_word parameter allows you to specify a word or phrase that should be emphasized or used as the main subject identifier in the rewritten text. This can help ensure that the output remains focused on a particular theme or concept.
avoid_terms
The avoid_terms parameter lets you list words or phrases that should be avoided in the rewritten text. This is useful for steering clear of specific language or topics that may not be appropriate for the intended audience or context.
response_cleanup
The response_cleanup parameter determines the level of post-processing applied to the rewritten text. Options include "none," "basic," "standard," and "strict," each applying different levels of text cleaning, such as trimming whitespace or removing unwanted characters. This ensures the final output is polished and free of unnecessary artifacts.
VLM Style Rewriter Output Parameters:
rewritten
The rewritten parameter is the primary output of the node, containing the text that has been transformed according to the specified style and instructions. This output reflects the desired stylistic changes and is ready for use in your intended application or context.
context
The context parameter is returned alongside the rewritten text to maintain continuity and state within the session. It ensures that any subsequent operations or nodes have access to the necessary session information for consistent processing.
VLM Style Rewriter Usage Tips:
- Experiment with different
styleoptions to see how they affect the tone and structure of the rewritten text. This can help you find the best fit for your specific needs. - Use the
temperatureparameter to balance creativity and coherence in the output. Lower values produce more predictable results, while higher values introduce more variation. - Leverage the
trigger_wordandavoid_termsparameters to fine-tune the focus and content of the rewritten text, ensuring it aligns with your goals.
VLM Style Rewriter Common Errors and Solutions:
Missing context information
- Explanation: The node requires context information to function correctly, but it was not provided.
- Solution: Ensure that the
contextparameter is correctly passed to the node, as it is essential for maintaining session state.
Invalid style option
- Explanation: The specified style is not recognized by the node.
- Solution: Check the
styleparameter and ensure it matches one of the available options: "cinematic," "technical," "narrative," "artistic," "documentary," or "custom."
Exceeded max_tokens limit
- Explanation: The rewritten text exceeds the specified maximum number of tokens.
- Solution: Increase the
max_tokensvalue to accommodate longer outputs or simplify the input text to reduce the length of the rewritten content.
