Table of Contents

✍️ Text Rewriter Demo Overview


🎯 Purpose of the Sample

The Text Rewriter Demo showcases how to utilize the LM-Kit.NET SDK for text rewriting tasks. This sample demonstrates the integration of large language models (LLMs) into a .NET application to rewrite text in different communication styles, enhancing the versatility and clarity of written content.


👥 Industry Target Audience

This sample is particularly beneficial for developers and organizations in the following sectors:

  • 📝 Content Creation: Automatically rewrite articles, blogs, and other written content in various styles to suit different audiences.
  • 📈 Marketing: Adapt marketing materials to different communication styles to better engage with diverse target audiences.
  • 📞 Customer Support: Tailor responses to match the desired tone and professionalism for various customer interactions.
  • 🏫 Education: Assist students and educators by providing tools to rewrite text in different styles for better understanding and engagement.

🚀 Problem Solved

Manually rewriting text to fit different communication styles is time-consuming and requires significant effort. The Text Rewriter Demo addresses this problem by leveraging LLMs to automate the text rewriting process, ensuring consistent and accurate results across various styles. This automation improves productivity and the quality of written content.


💻 Sample Application Description

The Text Rewriter Demo is a console application that allows users to rewrite text using various AI models and communication styles.

✨ Key Features

  • 📈 Model Selection: Users can choose from predefined models or provide a custom model URI.
  • 📊 Progress Tracking: The application displays download and loading progress for the selected model.
  • 🔄 Dynamic Text Rewriting: The application rewrites user-provided text in different communication styles.
  • 📈 Performance Metrics: Displays progress and status of the text rewriting process.

🧠 Supported Models

The sample supports several state-of-the-art models:

  • Mistral Nemo 2407 12.2B
  • Meta Llama 3.1 8B
  • Google Gemma2 9B Medium
  • Microsoft Phi-3 3.82B Mini
  • Alibaba Qwen-2 7.6B

🗣️ Communication Styles

The text can be rewritten in the following communication styles:

  • Concise
  • Professional
  • Friendly
  • All styles

🛠️ Getting Started

📋 Prerequisites

  • .NET Framework 4.6.2 or .NET 6.0

📥 Download the Project

▶️ Running the Application

  1. 📂 Clone the repository:

    git clone https://github.com/LM-Kit/lm-kit-net-samples.git
    
  2. 📁 Navigate to the project directory:

    cd lm-kit-net-samples/console_framework_4.62/text_rewriter
    

    or

    cd lm-kit-net-samples/console_net6/text_rewriter
    
  3. 🔨 Build and run the application:

    dotnet build
    dotnet run
    
  4. 📝 Follow the on-screen prompts to select a model and start rewriting text.

💡 Example Usage

  1. Select a Model: Choose from the available models or enter a custom model URI.
  2. Enter Text for Rewriting: Provide the text you want to be rewritten.
  3. Select Communication Style: Choose a communication style or select all styles to see multiple variations.
  4. Receive Rewritten Text: The application will process the text and display the rewritten version(s).
  5. Continue or Exit: Enter another text for rewriting or end the program by typing 'exit'.

By following these steps, developers can explore the functionalities of LM-Kit.NET and integrate advanced text rewriting capabilities into their applications, enhancing the versatility and clarity of written content through automated, AI-driven rewriting processes.