Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Chatbot for LA
#1
I just trained a Chatbot by using some material from LA website. It seems ok but not accurate. I would like to ask what kind of source file should I add for better results. If this is not allowed, I will remove them immediately. Thanks! Not I just added the content from Cookbook. LA chatbot

https://galaxy.ai/chat/67e9edd6c4cb5d769df86c56
#2
All HTML files from https://www.libreautomate.com. It includes the automation library, editor help articles, and cookbook, but not forum. ~3000 files

In the last LA version these files can be quickly downloaded: Options > Other > Documentation = Local > Apply. Then run this script to open the folder:
Code:
Copy      Help
run.it(folders.ProgramData + @"LibreAutomate\docs");
#3
Thank you so much Gintaras. I will add these docs and make a better personalized Chatbot for LA.
#4
Wink 
I got a result from trained bot when I ask "Using Libre automate to write script creating several text files in a folder on desktop if not exist please create it, each text will be populated with a poem; second, screenshots of each text file are taken ; third, the text files are renamed; finally, each screenshot is opened in Windows Paint. Use the most updated method from LibreAutomate."  

This AI generated code is working good. 
 
Code:
Copy      Help
[code]// script "Chatbot_Training.cs"
// Add necessary namespaces
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

// Create folder on Desktop
string desktop = folders.Desktop;
string folderPath = pathname.combine(desktop, "PoemFiles");
filesystem.createDirectory(folderPath);

// Sample poems to write to files
var poems = new[] {
    new { FileName = "poem1.txt", Content = "Roses are red,\nViolets are blue,\nSugar is sweet,\nAnd so are you!" },
    new { FileName = "poem2.txt", Content = "The world is charged\nWith the grandeur of God.\nIt will flame out,\nLike shining from shook foil;" },
    new { FileName = "poem3.txt", Content = "I think that I shall never see\nA poem lovely as a tree." }
};


// Create text files with poems
foreach (var poem in poems) {
    string filePath = pathname.combine(folderPath, poem.FileName);
    File.WriteAllText(filePath, poem.Content);
}


// Take screenshots of text content
foreach (var poem in poems) {
    string text = File.ReadAllText(pathname.combine(folderPath, poem.FileName));
    
    using (Bitmap bmp = new Bitmap(800, 600)) {
        using (var g = Graphics.FromImage(bmp)) {
            g.Clear(Color.White);
            using (var font = new Font("Arial", 14)) {
                var rect = new RectangleF(10, 10, 780, 580);
                g.DrawString(text, font, Brushes.Black, rect);
            }
        }

        string screenshotName = Path.GetFileNameWithoutExtension(poem.FileName) + "_screenshot.png";
        string screenshotPath = pathname.combine(folderPath, screenshotName);
        bmp.Save(screenshotPath, ImageFormat.Png);
    }
}


// Rename text files
foreach (var poem in poems) {
    string oldPath = pathname.combine(folderPath, poem.FileName);
    string newName = Path.GetFileNameWithoutExtension(poem.FileName) + "_renamed.txt";
    string newPath = pathname.combine(folderPath, newName);
    File.Move(oldPath, newPath);
}


// Open screenshots in Paint
foreach (var poem in poems) {
    string screenshotName = Path.GetFileNameWithoutExtension(poem.FileName) + "_screenshot.png";
    string screenshotPath = pathname.combine(folderPath, screenshotName);
    run.it("mspaint.exe", screenshotPath);
}

[/code]


Forum Jump:


Users browsing this thread: 1 Guest(s)