Well, as BedlessBlade mentioned, there already was a copyrighted project called GPT-ORE.
However, why would you ever need a large language model off of ORE chat, like an artificial intelligence program? All the questions being sent to the AI model may be offensive. For example, ChatGPT is known to sometimes generate dangerous or biased content, which means, anybody can simply ask the model to generate dangerous or biased content and output it into the chat, publicly visible by any player of this wonderful server.
If you want to integrate “GPT-ORE” you would need the AI to only respond questions relative to redstone engineering or computing. And to do that, you can use Levenshtein Distance, a C# example here:
using System;
using System.Collections.Generic;
using System.Linq;
namespace OreGptExample
{
/// <summary>
/// Contains general extensions.
/// </summary>
internal static class Extensions
{
/// <summary>
/// Calculate the difference between 2 strings using the Levenshtein distance algorithm
/// </summary>
/// <param name="source1">First string</param>
/// <param name="source2">Second string</param>
/// <returns></returns>
public static int CompareWithLd(this string source1, string source2) //O(n*m)
{
var source1Length = source1.Length;
var source2Length = source2.Length;
var matrix = new int[source1Length + 1, source2Length + 1];
if (source1Length == 0)
return source2Length;
if (source2Length == 0)
return source1Length;
for (var i = 0; i <= source1Length; matrix[i, 0] = i++){}
for (var j = 0; j <= source2Length; matrix[0, j] = j++){}
for (var i = 1; i <= source1Length; i++)
{
for (var j = 1; j <= source2Length; j++)
{
var cost = (source2[j - 1] == source1[i - 1]) ? 0 : 1;
matrix[i, j] = Math.Min(
Math.Min(matrix[i - 1, j] + 1, matrix[i, j - 1] + 1),
matrix[i - 1, j - 1] + cost);
}
}
return matrix[source1Length, source2Length];
}
}
internal struct Messages
{
public static string[] ComputingMessages =
{ "Generate me a C# Hello World example",
"What is IEnumerable used for in C#?",
"Java vs. C#"
};
public static string[] RedstoneMessages =
{
"Can you provide 5 CPUs in Minecraft?",
"What is the Open Redstone Engineers server?",
"What is the redstone block used for?"
};
public static string[] ComputingAnswers =
{
@"Sure! Here's a C# program to generate a Hello World program!
$code
using System;
namespace HelloWorld
{
static class Program
{
static void Main(string[] args)
{
Console.WriteLine(""Hello, World!"");
}
}
}
$endcode
You can use Microsoft Visual Studio to compile and run your
program, or you can use an online C# compiler.",
@"In C#, an IEnumerable interface contains methods to make a class iterable with 'foreach'. You can specify what to do during iteration, and what to return during iteration with the ""yield return"" keyword instead of ""return"". You can find IEnumerable interface in the System.Collections namespace.",
@"Java and C# are completely different languages while having similar syntax.
Java:
- For Android apps
- To get better context with Kotlin and JavaScript
- To write Minecraft modifications
- For cross-platform apps
C#:
- For Windows apps
- For game development (with Unity)
- For language development
- For cross-platform apps
- For server-side apps, similar to PHP but C# (with ASP.NET/Blazor)
- For mobile apps (with Xamarin)
- For project tests (with NUnit Framework)
As you can see, C# generally takes a win here but each of these languages
have their own upsides and downsides, so there is no such thing as
""better language""."
};
public static string[] RedstoneAnswers =
{
@"Sure! Here is a list of 5 CPUs in Minecraft ever made:
1. CHUNGUS2 by sammyuri
2. MPU8 (the fastest CPU) by ModPunchtree
3. Black Box V2 by _rzecz
4. ANPU by Q2CK
5. Carbon by Whiskerss
But note that there are a lot more CPUs than I provided. These are just
some CPUs, based on your question.",
@"An Open Redstone Engineers (ORE) server is a server
intended for players to do computational redstone engineering. This
is where a world of computational redstone is opening, most of the insane
computers were made by players from this server. You can hop on this server
on 1.18.2 Minecraft Java Edition: mc.openredstone.org, or visit their
website: discourse.openredstone.org.",
@"A redstone block is a redstone component in Minecraft used to give
all redstone wires/repeaters/comparators/pistons a 15 redstone strength that stick
next to the block. It can be crafted with 9 redstone dust."
};
}
public enum QuestionType : byte
{
Computing,
Redstone
}
public class AnswerInfo
{
public string Answer { get; set; }
public int ConfidencePercentage { get; set; }
public bool Understandable { get; set; }
}
public class ResponseManager
{
public static AnswerInfo GetResponse(string Message,
QuestionType qt)
{
AnswerInfo info = new AnswerInfo();
info.Understandable = true;
if (qt == QuestionType.Redstone)
{
List<string> qList = new List<string>(); // questions
List<string> aList = new List<string>(); // answers
List<int> scores = new List<int>();
foreach (string q in Messages.RedstoneMessages)
{
qList.Add(q);
}
foreach (string a in Messages.RedstoneAnswers)
{
aList.Add(a);
}
for (int i = 0; i < qList.Count; i++)
{
scores.Add(Message.CompareWithLd(qList[i]));
}
int min = scores.Min();
int idx = scores.IndexOf(min);
if (min > 100)
info.Understandable = false;
else
{
int confidence = Math.Abs(min - 100);
info.ConfidencePercentage = confidence;
}
if (info.Understandable)
{
info.Answer = aList[idx];
return info;
}
else
{
return new AnswerInfo();
}
}
else
{
List<string> qList = new List<string>(); // questions
List<string> aList = new List<string>(); // answers
List<int> scores = new List<int>();
foreach (string q in Messages.ComputingMessages)
{
qList.Add(q);
}
foreach (string a in Messages.ComputingAnswers)
{
aList.Add(a);
}
for (int i = 0; i < qList.Count; i++)
{
scores.Add(Message.CompareWithLd(qList[i]));
}
int min = scores.Min();
int idx = scores.IndexOf(min);
if (min > 100)
info.Understandable = false;
else
{
int confidence = Math.Abs(min - 100);
info.ConfidencePercentage = confidence;
}
if (info.Understandable)
{
info.Answer = aList[idx];
return info;
}
else
{
return new AnswerInfo();
}
}
}
}
class Program
{
static void Main()
{
Console.WriteLine("Asking for \"explain redstone block\" with category \"Redstone\"...");
Console.WriteLine(ResponseManager.GetResponse("explain redstone block", QuestionType.Redstone).Answer);
Console.WriteLine();
Console.WriteLine("Asking for \"generate me a c# hello world example\" with category \"Computing\"...");
Console.WriteLine(ResponseManager.GetResponse("generate me a c# hello world example", QuestionType.Computing).Answer);
Console.WriteLine("\n\nConfidence to previous answer: " + ResponseManager.GetResponse("generate me a c# hello world example", QuestionType.Computing).ConfidencePercentage + "%/100%");
}
}
}
Either way, I still don’t think staff would opt-in and I also don’t think that it is useful.