diff --git a/ai/fine-tuning-v1/general-wires/detach_query.shs b/ai/fine-tuning-v1/general-wires/detach_query.shs new file mode 100644 index 0000000000..8f261596cd --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/detach_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I execute one wire that will run asynchornously to the main wire.""" + + solution: """ + @wire(wire{ + Detach(wire-to-run-asynchronously) + }) + """ + + explicit: """ + @wire(wire{ + Detach(Wire:wire-to-run-asynchronously) + }) + """ + + explanation: """ + Detach will execute a wire concurrently in the background within the same mesh as the parent wire. Only one wire of each unique wire + can be detached at any point in time. Subsequent detaches of the same wire, will be ignored. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/doMany_query.shs b/ai/fine-tuning-v1/general-wires/doMany_query.shs new file mode 100644 index 0000000000..bb3ecf8104 --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/doMany_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I execute and generate multiple wires that will execute inline to the parent wire.""" + + solution: """ + @wire(main-wire{ + [1 2 3] + DoMany(other-wire) + }) + """ + + explicit: """ + @wire(main-wire{ + [1 2 3] + Do(Wire:other-wire) + }) + """ + + explanation: """ + DoMany is a shard that will generate and execute multiple wires inline to the parent wire. As opposed to Do which will only generate + one wire that is reused, DoMany will generate a number of wires depending on the number of elements in the sequence passed in as input. + + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/do_query.shs b/ai/fine-tuning-v1/general-wires/do_query.shs new file mode 100644 index 0000000000..d24432ff3e --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/do_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I execute a wire from the main wire and continue the main wire after complete execution of the executed wire.""" + + solution: """ + @wire(main-wire{ + Do(other-wire) + }) + """ + + explicit: """ + @wire(main-wire{ + Do(Wire:other-wire) + }) + """ + + explanation: """ + The Do Shard is a wire executor. When called, it will run the wire specified in the Wire parameter inline within the current wire. + The called wire will execute from the start every time it is called and run synchronously within the context of the parent wire. + + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/pause_query.shs b/ai/fine-tuning-v1/general-wires/pause_query.shs new file mode 100644 index 0000000000..1f6c479fc1 --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/pause_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I stop a wire from executing momentarily for a period of time""" + + solution: """ + @wire(wire{ + Pause(0.5) + }) + """ + + explicit: """ + @wire(wire{ + Pause(Time: 0.5) + }) + """ + + explanation: """ + The Pause Shard is a Shard that stops a wire from being executed momentarily for a period of time. If the wire is called by a wire + Executor Shard within the time frame specified in the Time parameter, it will be ignored. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/restart_query.shs b/ai/fine-tuning-v1/general-wires/restart_query.shs new file mode 100644 index 0000000000..38832d0857 --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/restart_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I resume a wire that has been suspended from the start of the wire?""" + + solution: """ + @wire(wire{ + Restart(wire-paused) + }) + """ + + explicit: """ + @wire(wire{ + Restart(Wire:wire-paused) + }) + """ + + explanation: """ + Restart is a Shard that will resume a previously suspended wire from the start of said wire. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/resume_query.shs b/ai/fine-tuning-v1/general-wires/resume_query.shs new file mode 100644 index 0000000000..2975c010da --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/resume_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I resume a wire that has been suspended from the point of suspension?""" + + solution: """ + @wire(wire{ + Resume(wire-paused) + }) + """ + + explicit: """ + @wire(wire{ + Resume(Wire:wire-paused) + }) + """ + + explanation: """ + Resume will execute a previously suspended wire from the point of suspension. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/spawn_query.shs b/ai/fine-tuning-v1/general-wires/spawn_query.shs new file mode 100644 index 0000000000..f43fd9bfcf --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/spawn_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I execute multiple wires that will run asynchornously to the main wire.""" + + solution: """ + @wire(wire{ + Detach(wire-to-run-asynchronously) + }) + """ + + explicit: """ + @wire(wire{ + Detach(Wire:wire-to-run-asynchronously) + }) + """ + + explanation: """ + Spawn will generate multiple wires that will run concurrently in the background within the same mesh as the parent wire. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/stepMany_query.shs b/ai/fine-tuning-v1/general-wires/stepMany_query.shs new file mode 100644 index 0000000000..820356e592 --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/stepMany_query.shs @@ -0,0 +1,27 @@ +{ + prompt: """How do I execute and generate multiple wires that will execute inline to the parent wire and continue their state whenever called.""" + + solution: """ + @wire(main-wire{ + [1 2 3] + DoMany(other-wire) + }) + """ + + explicit: """ + @wire(main-wire{ + [1 2 3] + Do(Wire:other-wire) + }) + """ + + explanation: """ + StepMany is a Shard that will generate and execute multiple wires inline to the parent wire. As opposed to Step which will only generate + one wire that is reused, StepMany will generate a number of wires depending on the number of elements in the sequence passed in as input. + StepMany will also continue the state of the wires generated whenever called, unlike DoMany and Do which will execute from the beginning of + the wire. + + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/step_query.shs b/ai/fine-tuning-v1/general-wires/step_query.shs new file mode 100644 index 0000000000..817a65c76e --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/step_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I execute a wire that continues its state whenever it is called.""" + + solution: """ + @wire(main-wire{ + Step(other-wire-that-continues) + }) + """ + + explicit: """ + @wire(main-wire{ + Step(Wire:other-wire-that-continues) + }) + """ + + explanation: """ + The Step Shard is a wire executor. When called, it will execute the wire specified in the Wire parameter. + Like the Do Shard, Step will run the specified wire synchronously within the context of the parent wire. + Unlike the Do Shard, which will execute a wire from the start whenever it is called, the Step Shard will continue executing a wire + from where it last left off. For example, if a stepped wire is paused using the Pause Shard, the next time it is called, it will + continue its state from where it last paused. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/stop_query.shs b/ai/fine-tuning-v1/general-wires/stop_query.shs new file mode 100644 index 0000000000..a34e46f8e2 --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/stop_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I stop a wire?""" + + solution: """ + @wire(main-wire{ + Stop(wire-to-stop) + }) + """ + + explicit: """ + @wire(main-wire{ + Stop(Wire:wire-to-stop) + }) + """ + + explanation: """ + Stop is a Shard that will stop a wire from executing. The wire can be executed again but it will be executed from the start, unlike + Suspend which can be re-executed from the point of suspension. If no wire is fed into the Wire parameter, it will Stop the current wire. + + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/suspend_query.shs b/ai/fine-tuning-v1/general-wires/suspend_query.shs new file mode 100644 index 0000000000..14735f3cff --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/suspend_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I pause a wire until it is specifically resumed. """ + + solution: """ + @wire(wire{ + Suspend(wire-to-pause) + }) + """ + + explicit: """ + @wire(wire{ + Suspend(Wire:wire-to-pause) + }) + """ + + explanation: """ + The Suspend shard is a shard that will pause the wire specified in the Wire parameter indefinitely until the Resume or Restart + shards are used to revive the wire. If no wire is fed into the Wire parameter, it will suspend the current wire. + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general-wires/switchto_query.shs b/ai/fine-tuning-v1/general-wires/switchto_query.shs new file mode 100644 index 0000000000..556f39f2a3 --- /dev/null +++ b/ai/fine-tuning-v1/general-wires/switchto_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I suspend a wire and immediately switch execution to a different wire?""" + + solution: """ + @wire(main-wire{ + SwitchTo(wire-to-switch-to false) + }) + """ + + explicit: """ + @wire(main-wire{ + SwitchTo(Wire:wire-to-switch-to Restart:false) + }) + """ + + explanation: """ + SwitchTo is a shard that suspends the currennt wire and switches execution to the wire specified in the Wire parameter. If the Restart + parameter is set to true, the wire being switched to will restart instead of resuming from its suspended state. + + """ + + tag: " #General-Wire" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/FromBase58_query.shs b/ai/fine-tuning-v1/general/FromBase58_query.shs new file mode 100644 index 0000000000..0ebfd54ebe --- /dev/null +++ b/ai/fine-tuning-v1/general/FromBase58_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert Base58 to bytes?""" + + solution: """ + bytes + FromBase58 + """ + + explicit: """ + bytes + FromBase58 + """ + + explanation: """ + FromBase58 is a Shard that takes in a base58 string as input and outputs the corresponding bytes. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/FromBase64_query.shs b/ai/fine-tuning-v1/general/FromBase64_query.shs new file mode 100644 index 0000000000..97b4490eff --- /dev/null +++ b/ai/fine-tuning-v1/general/FromBase64_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert Base64 to bytes?""" + + solution: """ + bytes + FromBase64 + """ + + explicit: """ + bytes + FromBase64 + """ + + explanation: """ + FromBase64 is a Shard that takes in a base64 string as input and outputs the corresponding bytes. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/Table_query.shs b/ai/fine-tuning-v1/general/Table_query.shs new file mode 100644 index 0000000000..a7a4dfcca6 --- /dev/null +++ b/ai/fine-tuning-v1/general/Table_query.shs @@ -0,0 +1,29 @@ +{ + prompt: """How do I create an empty Table?""" + + solution: """ + Table(table-created) + """ + + explicit: """ + Table( + Name: table-created + ;;Global: + ;;Type: + ) + """ + + explanation: """ + Table creates an empty table with or without a specified key (via the :Key parameter). + The created table name is defined in the :Name parameter. + + Whether the created table variable has a global scope (available to all wires on the mesh) or a local scope + (available only to the wire its defined in) can be controlled via the Global parameter (true for global scope, false + for local scope; default is false). + + In addition to the key and the scope, this shard can also define the table's inner data types via the Types parameter. + More than one data type may be set. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToBase58_query.shs b/ai/fine-tuning-v1/general/ToBase58_query.shs new file mode 100644 index 0000000000..7b156d3055 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToBase58_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert bytes to Base58""" + + solution: """ + 5 + ToBytes + ToBase58 + """ + + explicit: """ + 5 + ToBytes + ToBase58 + """ + + explanation: """ + ToBase58 is a Shard that takes in bytes as input and outputs a base58 format string. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToBase64_query.shs b/ai/fine-tuning-v1/general/ToBase64_query.shs new file mode 100644 index 0000000000..d2851fbcf2 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToBase64_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert bytes to Base64""" + + solution: """ + 5 + ToBytes + ToBase64 + """ + + explicit: """ + 5 + ToBytes + ToBase64 + """ + + explanation: """ + ToBase64 is a Shard that takes in bytes as input and outputs a base64 format string. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToBytes_query.shs b/ai/fine-tuning-v1/general/ToBytes_query.shs new file mode 100644 index 0000000000..e3dca0304b --- /dev/null +++ b/ai/fine-tuning-v1/general/ToBytes_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert something to Bytes""" + + solution: """ + 5 + ToBytes + """ + + explicit: """ + 5 + ToBytes + """ + + explanation: """ + ToBytes is a Shard that converts what is fed into input into bytes in its serialized form. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToColor_query.shs b/ai/fine-tuning-v1/general/ToColor_query.shs new file mode 100644 index 0000000000..3df25debaf --- /dev/null +++ b/ai/fine-tuning-v1/general/ToColor_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I convert a integer to a RGBA color value""" + + solution: """ + 5 ; integer to convert + ToColor + """ + + explicit: """ + 5 ; integer to convert + ToColor + """ + + explanation: """ + The ToColor Shard converts an input with numeric value into 4-dimensional color vector represented as four integers. + The first integer represents the Red value, the second integer represents the Green value, the third integer represents the Blue value and the last integer represents the Alpha. + The value will always be rounded down to the nearest integer. If the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. + For example, in the solution provided above, ToInt4 will output (5 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers. + If the value has more than 4 dimensions, only the first four values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToColor_query2.shs b/ai/fine-tuning-v1/general/ToColor_query2.shs new file mode 100644 index 0000000000..1110de5d41 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToColor_query2.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I convert a float to a RGBA color value""" + + solution: """ + 5.0 ; float to convert + ToColor + """ + + explicit: """ + 5.0 ; float to convert + ToColor + """ + + explanation: """ + The ToColor Shard converts an input with numeric value into 4-dimensional color vector represented as four integers. + The first integer represents the Red value, the second integer represents the Green value, the third integer represents the Blue value and the last integer represents the Alpha. + The value will always be rounded down to the nearest integer. If the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. + For example, in the solution provided above, ToInt4 will output (5 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers. + If the value has more than 4 dimensions, only the first four values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToColor_query3.shs b/ai/fine-tuning-v1/general/ToColor_query3.shs new file mode 100644 index 0000000000..1a0a380736 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToColor_query3.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I convert a string to a RGBA color value""" + + solution: """ + "5.0" ; string to convert + ToInt + """ + + explicit: """ + "5.0" ; string to convert + ToInt + """ + + explanation: """ + The ToColor Shard converts an input with numeric value into 4-dimensional color vector represented as four integers. + The first integer represents the Red value, the second integer represents the Green value, the third integer represents the Blue value and the last integer represents the Alpha. + The value will always be rounded down to the nearest integer. If the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. + For example, in the solution provided above, ToInt4 will output (5 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers. + If the value has more than 4 dimensions, only the first four values will be used. + If a string that has no numeric value such as "Three", "Five"or "hello" is passed in, the Shard will return (0 0 0 0) + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat2_query.shs b/ai/fine-tuning-v1/general/ToFloat2_query.shs new file mode 100644 index 0000000000..ba89fc656f --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat2_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert an integer to a float2?""" + + solution: """ + 5 ; integer to convert + ToFloat2 + """ + + explicit: """ + 5 ; integer to convert + ToFloat2 + """ + + explanation: """ + The ToFloat2 Shard converts an input with numeric value into 2-dimensional vector represented as two floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second floating point number.For example, in the solution provided above, ToFloat2 will out put (5.0 0.0). If the input is two + dimensional, it will assign the floating point numbers accordingly. If the input has more than 2 dimensions, the Shard will only use the first 2 values provided. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat2_query2.shs b/ai/fine-tuning-v1/general/ToFloat2_query2.shs new file mode 100644 index 0000000000..5761d0a715 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat2_query2.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a float to a float2?""" + + solution: """ + 5.0 ; float to convert + ToFloat2 + """ + + explicit: """ + 5.0 ; float to convert + ToFloat2 + """ + + explanation: """ + The ToFloat2 Shard converts an input with numeric value into 2-dimensional vector represented as two floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second floating point number.For example, in the solution provided above, ToFloat2 will out put (5.0 0.0). If the input is two + dimensional, it will assign the floating point numbers accordingly. If the input has more than 2 dimensions, the Shard will only use the first 2 values provided. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat2_query3.shs b/ai/fine-tuning-v1/general/ToFloat2_query3.shs new file mode 100644 index 0000000000..84e1d4e171 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat2_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to a float2?""" + + solution: """ + "5" ; string to convert + ToFloat2 + """ + + explicit: """ + "5" ; string to convert + ToFloat2 + """ + + explanation: """ + The ToFloat2 Shard converts an input with numeric value into 2-dimensional vector represented as two floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second floating point number.For example, in the solution provided above, ToFloat2 will out put (5.0 0.0). If the input is two + dimensional, such as "3 2" it will assign the floating point numbers accordingly. If the input has more than 2 dimensions, the Shard will only use the first 2 values provided. + If a string that has no numeric value such as "Three", "Five"or "hello" is passed in, the Shard will return (0.0 0.0) + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat3_query.shs b/ai/fine-tuning-v1/general/ToFloat3_query.shs new file mode 100644 index 0000000000..47c40559b7 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat3_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert an integer to a float3?""" + + solution: """ + 5 ; integer to convert + ToFloat3 + """ + + explicit: """ + 5 ; integer to convert + ToFloat3 + """ + + explanation: """ + The ToFloat3 Shard converts an input with numeric value into 3-dimensional vector represented as three floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second and third floating point number.For example, in the solution provided above, ToFloat3 will out put (5.0 0.0 0.0). If the input is two + dimensional, it will assign 0.0 to the third floating point number. If the input has more than 3 dimensions, the Shard will only use the first 3 values provided. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat3_query2.shs b/ai/fine-tuning-v1/general/ToFloat3_query2.shs new file mode 100644 index 0000000000..46edad556d --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat3_query2.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a float to a float3?""" + + solution: """ + 5.0 ; float to convert + ToFloat3 + """ + + explicit: """ + 5.0 ; float to convert + ToFloat3 + """ + + explanation: """ + The ToFloat3 Shard converts an input with numeric value into 3-dimensional vector represented as three floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second second and third floating point number.For example, in the solution provided above, ToFloat3 will out put (5.0 0.0 0.0). If the input is two + dimensional, it will assign 0.0 to the third floating point number. If the input has more than 3 dimensions, the Shard will only use the first 3 values provided. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat3_query3.shs b/ai/fine-tuning-v1/general/ToFloat3_query3.shs new file mode 100644 index 0000000000..2d7a947679 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat3_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to a float3?""" + + solution: """ + "5.0" ; string to convert + ToFloat3 + """ + + explicit: """ + "5.0" ; string to convert + ToFloat3 + """ + + explanation: """ + The ToFloat3 Shard converts an input with numeric value into 3-dimensional vector represented as three floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second second and third floating point number.For example, in the solution provided above, ToFloat3 will out put (5.0 0.0 0.0). If the input is two + dimensional, it will assign 0.0 to the third floating point number. If the input has more than 3 dimensions, the Shard will only use the first 3 values provided. + If a string that has no numeric value like "Three", "Five" or "hello" is passed in, the Shard will return (0.0 0.0 0.0) + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat4_query.shs b/ai/fine-tuning-v1/general/ToFloat4_query.shs new file mode 100644 index 0000000000..756028702d --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat4_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert an integer to a float4?""" + + solution: """ + 5 ; integer to convert + ToFloat4 + """ + + explicit: """ + 5 ; integer to convert + ToFloat4 + """ + + explanation: """ + The ToFloat4 Shard converts an input with numeric value into 4-dimensional vector represented as four floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second, third and fourth floating point number. For example, in the solution provided above, ToFloat4 will output (5.0 0.0 0.0 0.0). If the input is two + dimensional, it will assign 0.0 to the third and fourth floating point number. If the input has more than 4 dimensions, the Shard will only use the first 4 values provided. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat4_query2.shs b/ai/fine-tuning-v1/general/ToFloat4_query2.shs new file mode 100644 index 0000000000..ce353a5bfa --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat4_query2.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a float to a float4?""" + + solution: """ + 5.0 ; float to convert + ToFloat4 + """ + + explicit: """ + 5.0 ; float to convert + ToFloat4 + """ + + explanation: """ + The ToFloat4 Shard converts an input with numeric value into 4-dimensional vector represented as four floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second, third and fourth floating point number in the solution provided above, ToFloat4 will output (5.0 0.0 0.0 0.0). If the input is two + dimensional, it will assign 0.0 to the third and fourth floating point number. If the input has more than 4 dimensions, the Shard will only use the first 4 values provided. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat4_query3.shs b/ai/fine-tuning-v1/general/ToFloat4_query3.shs new file mode 100644 index 0000000000..e7b40822ee --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat4_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to a float4?""" + + solution: """ + "5" ; string to convert + ToFloat4 + """ + + explicit: """ + "5" ; string to convert + ToFloat4 + """ + + explanation: """ + The ToFloat4 Shard converts an input with numeric value into 4-dimensional vector represented as four floating point numbers. If the input is one dimensional, + the Shard will assign 0.0 to the second, third and fourth floating point number in the solution provided above, ToFloat4 will output (5.0 0.0 0.0 0.0). If the input is two + dimensional, it will assign 0.0 to the third and fourth floating point number. If the input has more than 4 dimensions, the Shard will only use the first 4 values provided. + If a string that has no numeric value like "Three", "Five" or "hello" is passed in, the Shard will return (0.0 0.0 0.0 0.0) + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat_query.shs b/ai/fine-tuning-v1/general/ToFloat_query.shs new file mode 100644 index 0000000000..72b85d5de7 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I convert an integer to a float?""" + + solution: """ + 5 ; integer to convert + ToFloat + """ + + explicit: """ + 5 ; integer to convert + ToFloat + """ + + explanation: """ + The ToFloat Shard takes in a integer or a string with numeric value and converts it into a float. If the + value has more than one dimension, only the first value will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToFloat_query2.shs b/ai/fine-tuning-v1/general/ToFloat_query2.shs new file mode 100644 index 0000000000..e9a30418df --- /dev/null +++ b/ai/fine-tuning-v1/general/ToFloat_query2.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I convert a string to a float?""" + + solution: """ + "5" ; string to convert + ToFloat + """ + + explicit: """ + "5" ; string to convert + ToFloat + """ + + explanation: """ + The ToFloat Shard takes in a integer or a string with numeric value and converts it into a float. If a string that has no numeric value like "Three", "Five" + or "hello" is passed in, the Shard will return 0.0. If the value has more than one dimension, only the first value will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToHex_query.shs b/ai/fine-tuning-v1/general/ToHex_query.shs new file mode 100644 index 0000000000..0f77bb09ef --- /dev/null +++ b/ai/fine-tuning-v1/general/ToHex_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert an integer to an hexidecimal value?""" + + solution: """ + 5 ; integer to convert + ToHex + """ + + explicit: """ + 5 ; integer to convert + ToHex + """ + + explanation: """ + The ToHex Shard takes in either an integer, bytes or a string and converts it into a hexidecimal value + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToHex_query2.shs b/ai/fine-tuning-v1/general/ToHex_query2.shs new file mode 100644 index 0000000000..b443db78dc --- /dev/null +++ b/ai/fine-tuning-v1/general/ToHex_query2.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert a byte to an hexidecimal value?""" + + solution: """ + 5 ; byte to convert + ToHex + """ + + explicit: """ + 5 ; byte to convert + ToHex + """ + + explanation: """ + The ToHex Shard takes in either an integer, bytes or a string and converts it into a hexidecimal value + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToHex_query3.shs b/ai/fine-tuning-v1/general/ToHex_query3.shs new file mode 100644 index 0000000000..a7d1182ff3 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToHex_query3.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert a string to an hexidecimal value?""" + + solution: """ + "5" ; string to convert + ToHex + """ + + explicit: """ + "5" ; string to convert + ToHex + """ + + explanation: """ + The ToHex Shard takes in either an integer, bytes or a string and converts it into a hexidecimal value + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt16_query.shs b/ai/fine-tuning-v1/general/ToInt16_query.shs new file mode 100644 index 0000000000..cb8a07dca3 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt16_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a float to an int16?""" + + solution: """ + 5.0 ; float to convert + ToInt + """ + + explicit: """ + 5.0 ; float to convert + ToInt + """ + + explanation: """ + The ToInt16 Shard converts an input with numeric value into 16-dimensional vector represented as 16 integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and o forth. For example, in the solution provided above, ToInt16 will output + (5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 16 dimensions, + only the first 16 values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt16_query2.shs b/ai/fine-tuning-v1/general/ToInt16_query2.shs new file mode 100644 index 0000000000..154c1188ce --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt16_query2.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert an integer to an int16?""" + + solution: """ + 5 ; integer to convert + ToInt + """ + + explicit: """ + 5 ; integer to convert + ToInt + """ + + explanation: """ + The ToInt16 Shard converts an input with numeric value into 16-dimensional vector represented as 16 integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and o forth. For example, in the solution provided above, ToInt16 will output + (5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 16 dimensions, + only the first 16 values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt16_query3.shs b/ai/fine-tuning-v1/general/ToInt16_query3.shs new file mode 100644 index 0000000000..8e8847f430 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt16_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to an int16?""" + + solution: """ + "5" ; string to convert + ToInt + """ + + explicit: """ + "5" ; string to convert + ToInt + """ + + explanation: """ + The ToInt16 Shard converts an input with numeric value into 16-dimensional vector represented as 16 integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and o forth. For example, in the solution provided above, ToInt16 will output + (5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 16 dimensions, + only the first 16 values will be used. If a string that has no numeric value, like "Three", "Five" or "hello" is passed in, the Shard will return (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt2_query.shs b/ai/fine-tuning-v1/general/ToInt2_query.shs new file mode 100644 index 0000000000..fe619b0461 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt2_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a float to an int2?""" + + solution: """ + 5.0 ; float to convert + ToInt + """ + + explicit: """ + 5.0 ; float to convert + ToInt + """ + + explanation: """ + The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second integer.For example, in the solution provided above, ToInt2 will output (5 0). If the input is two + dimensional, it will assign the integers accordingly. If the value has more than 2 dimensions, only the first two values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt2_query2.shs b/ai/fine-tuning-v1/general/ToInt2_query2.shs new file mode 100644 index 0000000000..14f98accec --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt2_query2.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to an int2?""" + + solution: """ + "5.0" ; string to convert + ToInt + """ + + explicit: """ + "5.0" ; string to convert + ToInt + """ + + explanation: """ + The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second integer.For example, in the solution provided above, ToInt2 will output (5 0). If the input is two + dimensional, it will assign the integers accordingly. If the value has more than 2 dimensions, only the first two values will be used. If a string that has no numeric + value like "Three", "Five" or "hello" is passed in, the Shard will return (0 0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt2_query3.shs b/ai/fine-tuning-v1/general/ToInt2_query3.shs new file mode 100644 index 0000000000..8638ce1c7b --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt2_query3.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert an integer to an int2?""" + + solution: """ + 5 ; integer to convert + ToInt + """ + + explicit: """ + 5 ; integer to convert + ToInt + """ + + explanation: """ + The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second integer.For example, in the solution provided above, ToInt2 will output (5 0). If the input is two + dimensional, it will assign the integers accordingly. If the value has more than 2 dimensions, only the first two values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt3_query.shs b/ai/fine-tuning-v1/general/ToInt3_query.shs new file mode 100644 index 0000000000..d1eaba57b7 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt3_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a float to an int3?""" + + solution: """ + 5.0 ; float to convert + ToInt + """ + + explicit: """ + 5.0 ; float to convert + ToInt + """ + + explanation: """ + The ToInt3 Shard converts an input with numeric value into 3-dimensional vector represented as three integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second and third integers. For example, in the solution provided above, ToInt3 will output (5 0 0). If the input is two + dimensional, it will assign 0 to the third integer. If the value has more than 3 dimensions, only the first three values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt3_query2.shs b/ai/fine-tuning-v1/general/ToInt3_query2.shs new file mode 100644 index 0000000000..49114c56ca --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt3_query2.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert an integer to an int3?""" + + solution: """ + 5 ; integer to convert + ToInt + """ + + explicit: """ + 5 ; integer to convert + ToInt + """ + + explanation: """ + The ToInt3 Shard converts an input with numeric value into 3-dimensional vector represented as three integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second and third integers. For example, in the solution provided above, ToInt3 will output (5 0 0). If the input is two + dimensional, it will assign 0 to the third integer. If the value has more than 3 dimensions, only the first three values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt3_query3.shs b/ai/fine-tuning-v1/general/ToInt3_query3.shs new file mode 100644 index 0000000000..be416d09a8 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt3_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to an int3?""" + + solution: """ + "5" ; string to convert + ToInt + """ + + explicit: """ + "5" ; string to convert + ToInt + """ + + explanation: """ + The ToInt3 Shard converts an input with numeric value into 3-dimensional vector represented as three integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second and third integers. For example, in the solution provided above, ToInt3 will output (5 0 0). If the input is two + dimensional, it will assign 0 to the third integer. If the value has more than 3 dimensions, only the first three values will be used. If a string that has no numeric + value like "Three", "Five" or "hello" is passed in, the Shard will return (0 0 0 0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt4_query.shs b/ai/fine-tuning-v1/general/ToInt4_query.shs new file mode 100644 index 0000000000..85e5bef899 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt4_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a float to an int4?""" + + solution: """ + 5.0 ; float to convert + ToInt + """ + + explicit: """ + 5.0 ; float to convert + ToInt + """ + + explanation: """ + The ToInt4 Shard converts an input with numeric value into 4-dimensional vector represented as four integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. For example, in the solution provided above, ToInt4 will output (5 0 0 0). + If the input is two dimensional, it will assign 0 to the third and fourth integers. If the value has more than 4 dimensions, only the first four values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt4_query2.shs b/ai/fine-tuning-v1/general/ToInt4_query2.shs new file mode 100644 index 0000000000..f3a9902d91 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt4_query2.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert a int to an int4?""" + + solution: """ + 5 ; integer to convert + ToInt + """ + + explicit: """ + 5 ; integer to convert + ToInt + """ + + explanation: """ + The ToInt4 Shard converts an input with numeric value into 4-dimensional vector represented as four integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. For example, in the solution provided above, ToInt4 will output (5 0 0 0). + If the input is two dimensional, it will assign 0 to the third and fourth integers. If the value has more than 4 dimensions, only the first four values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt4_query3.shs b/ai/fine-tuning-v1/general/ToInt4_query3.shs new file mode 100644 index 0000000000..e7728b5ade --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt4_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to an int4?""" + + solution: """ + "5" ; string to convert + ToInt + """ + + explicit: """ + "5" ; atring to convert + ToInt + """ + + explanation: """ + The ToInt4 Shard converts an input with numeric value into 4-dimensional vector represented as four integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. For example, in the solution provided above, ToInt4 will output (5 0 0 0). + If the input is two dimensional, it will assign 0 to the third and fourth integers. If the value has more than 4 dimensions, only the first four values will be used. + If a string that has no numeric value, like "Three", "Five" or "hello" is passed in, the Shard will return (0 0 0 0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt8_query.shs b/ai/fine-tuning-v1/general/ToInt8_query.shs new file mode 100644 index 0000000000..c37d702eb3 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt8_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a float to an int8?""" + + solution: """ + 5.0 ; float to convert + ToInt + """ + + explicit: """ + 5.0 ; float to convert + ToInt + """ + + explanation: """ + The ToInt8 Shard converts an input with numeric value into 8-dimensional vector represented as eight integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and so forth. For example, in the solution provided above, ToInt4 will output + (5 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 8 dimensions, only + the first eight values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt8_query2.shs b/ai/fine-tuning-v1/general/ToInt8_query2.shs new file mode 100644 index 0000000000..c2597d2a59 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt8_query2.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert an integer to an int8?""" + + solution: """ + 5 ; integer to convert + ToInt + """ + + explicit: """ + 5 ; integer to convert + ToInt + """ + + explanation: """ + The ToInt8 Shard converts an input with numeric value into 8-dimensional vector represented as eight integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and so forth. For example, in the solution provided above, ToInt8 will output + (5 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 8 dimensions, only + the first eight values will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt8_query3.shs b/ai/fine-tuning-v1/general/ToInt8_query3.shs new file mode 100644 index 0000000000..90263f7f74 --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt8_query3.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I convert a string to an int8?""" + + solution: """ + "5" ; string to convert + ToInt + """ + + explicit: """ + "5" ; string to convert + ToInt + """ + + explanation: """ + The ToInt8 Shard converts an input with numeric value into 8-dimensional vector represented as eight integers. The value will always be rounded down to the nearest integer. If + the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and so forth. For example, in the solution provided above, ToInt8 will output + (5 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 8 dimensions, only + the first eight values will be used. If a string that has no numeric value, like "Three", "Five" or "hello" is passed in, the Shard will return (0 0 0 0 0 0 0 0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt_query.shs b/ai/fine-tuning-v1/general/ToInt_query.shs new file mode 100644 index 0000000000..83d9a508ff --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I convert a float to an integer?""" + + solution: """ + 5.0 ; integer to convert + ToInt + """ + + explicit: """ + 5.0 ; integer to convert + ToInt + """ + + explanation: """ + The ToInt Shard takes in a float or a string with numeric value and converts it into a integer. The value will always be rounded down to the nearest integer. If the + value has more than one dimension, only the first value will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToInt_query2.shs b/ai/fine-tuning-v1/general/ToInt_query2.shs new file mode 100644 index 0000000000..fdcf68423d --- /dev/null +++ b/ai/fine-tuning-v1/general/ToInt_query2.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I convert a string to an integer?""" + + solution: """ + "5.0" ; string to convert + ToInt + """ + + explicit: """ + "5.0" ; string to convert + ToInt + """ + + explanation: """ + The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If a string that has no numeric value like "Three", "Five" + or "hello" is passed in, the Shard will return 0. If the value has more than one dimension, only the first value will be used. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToLeb128_query.shs b/ai/fine-tuning-v1/general/ToLeb128_query.shs new file mode 100644 index 0000000000..6c53d4d47c --- /dev/null +++ b/ai/fine-tuning-v1/general/ToLeb128_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do i convert and int to Leb128 format?""" + + solution: """ + 5 ; int to convert + ToLEB128(Signed:false) + """ + + explicit: """ + 5 ; int to convert + ToLEB128(Signed:false) + """ + + explanation: """ + ToLEB128 will convert an int to a LEB128 format. The Signed parameter is for if the integer to encode/decode is signed and can be negative. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/ToString_Query.shs b/ai/fine-tuning-v1/general/ToString_Query.shs new file mode 100644 index 0000000000..59b06f753e --- /dev/null +++ b/ai/fine-tuning-v1/general/ToString_Query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert something to a string""" + + solution: """ + 5 ; string to convert + ToString + ;;Will output "5" + """ + + explicit: """ + 5 ; string to convert + ToString + ;;Will output "5" + """ + + explanation: """ + ToString converts any data type and outputs a string. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/and_query.shs b/ai/fine-tuning-v1/general/and_query.shs new file mode 100644 index 0000000000..aadccf5184 --- /dev/null +++ b/ai/fine-tuning-v1/general/and_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I check more than one condition?""" + + solution: """ + variable + When({Is(condition1) | And | variable2 | Is(condition2)} { + Pass ; Do Something + }) + """ + + explicit: + """Get(variable) + When(Predicate: {Is(condition1) | And | Get(variable2) | Is(condition2)} Action: { + Pass ; Do Something + })""" + + + explanation: """ + We use When or If Shards to create a conditional statement and do an action when the Predicate parameter returns true. + To chain more conditions to the Predicate we use the And Shard. With conditions chained by the And Shard, the Predicate parameter will only + return true when all conditions are met. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/appendTo_query.shs b/ai/fine-tuning-v1/general/appendTo_query.shs new file mode 100644 index 0000000000..d8c5099450 --- /dev/null +++ b/ai/fine-tuning-v1/general/appendTo_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How to add a new element to the end of an existing Shards sequence?""" + + solution: + """element | + AppendTo(sequence)""" + + + explicit: + """ Get(element) | + AppendTo(Collection: sequence)""" + + + explanation: """ + The AppendTo Shard adds an element that is passed as input to the end of a sequence specified in the Collection parameter. + This Shard works on both string and sequence variables. + The type of element being appended needs to be of the same type as the sequence. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/assoc_query.shs b/ai/fine-tuning-v1/general/assoc_query.shs new file mode 100644 index 0000000000..b0cdf221fa --- /dev/null +++ b/ai/fine-tuning-v1/general/assoc_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I replace an element of an existing sequence?""" + + solution: + """[index0 variable1 index1 variable2] | Assoc(sequence)""" + + explicit: + """[index0 variable1 index1 variable2] + | Assoc( + Name: sequence + ;;Key: key + )""" + + explanation: """ + The Assoc Shard is replacing element of index 0 in sequence with variable1 and element with index of 1 in sequence to variable2. + The input sequence for Assoc must always contain an even number of elements. + The elements of the input sequence are parsed in pairs. + The 1st element of each pair gives the index of the target element to update, and the 2nd element of that pair gives the new value for the target element. + Assoc can also be used to update a specific key in a table. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/bytesToString_query.shs b/ai/fine-tuning-v1/general/bytesToString_query.shs new file mode 100644 index 0000000000..4189f644b3 --- /dev/null +++ b/ai/fine-tuning-v1/general/bytesToString_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I convert bytes to String?""" + + solution: """ + bytes + BytesToString + """ + + explicit: """ + bytes + BytesToString + """ + + explanation: """ + BytesToString is a Shard that takes in an input of type Bytes and converts it to type String. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/clear_query.shs b/ai/fine-tuning-v1/general/clear_query.shs new file mode 100644 index 0000000000..b4458430b8 --- /dev/null +++ b/ai/fine-tuning-v1/general/clear_query.shs @@ -0,0 +1,17 @@ +{ + prompt: """How do i delete all the elements in a sequence.""" + + solution: + """Clear(sequence)""" + + explicit: + """Clear(Name: sequence)""" + + explanation: """ + Clear removes all the elements of the sequence that has been passed to it in the Name: parameter. + This Shard works on both sequences and tables. + Use the Key: parameter to delete all elements of the specified key in a table. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/const_query.shs b/ai/fine-tuning-v1/general/const_query.shs new file mode 100644 index 0000000000..7bb71c183d --- /dev/null +++ b/ai/fine-tuning-v1/general/const_query.shs @@ -0,0 +1,17 @@ +{ + prompt: """How do I create an unassigned constant in Shards.""" + + solution: + """Const(5) ;;Change the value accordingly""" + + explicit: + """Const(Value: 5) ;;Change the value accordingly""" + + explanation: """ + Const declares a constant value (of any data type) by passing it into the Value parameter. + A constant value declared with Const is un-named i.e., it is not assigned to any variable or allocated any alias. + In this scenario a constant value of 5 is declared and can be used as an input for other Shards. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/count_query.shs b/ai/fine-tuning-v1/general/count_query.shs new file mode 100644 index 0000000000..28a9d1da55 --- /dev/null +++ b/ai/fine-tuning-v1/general/count_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I get the total number of elements in a sequence?""" + + solution: """ + Count(sequence-to-count) + """ + + explicit: """ + Count( + Name: sequence-to-Count + ;; Key: key + ) + """ + + explanation: """ + Count parses the variable passed to it in the Name parameter, and returns the count of characters, elements, or key-value pairs depending on + whether the data type passed to it was a string, a sequence, or a table. Parameter Key applies only to tables. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/count_query2.shs b/ai/fine-tuning-v1/general/count_query2.shs new file mode 100644 index 0000000000..e6fbe010f0 --- /dev/null +++ b/ai/fine-tuning-v1/general/count_query2.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I count the total number of key and value pairs that a table has ?""" + + solution: """ + Count(table-to-count) + """ + + explicit: """ + Count + ( + Name: table-to-count + ;;Key: key-to-count + ) + """ + + explanation: """ + Count parses the value passed to it in the :Name parameter, and returns the count of characters, elements, or key-value pairs depending on whether the data type passed to it was a string, a sequence, or a table. + This Shard works on both sequences and tables. Parameter :Key applies only to tables. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/count_query3.shs b/ai/fine-tuning-v1/general/count_query3.shs new file mode 100644 index 0000000000..8fe189113f --- /dev/null +++ b/ai/fine-tuning-v1/general/count_query3.shs @@ -0,0 +1,18 @@ +{ + prompt: """How do I count the total number of elements in a sequence of a key from a table""" + + solution: """ + Count(table-to-count key-to-count) + """ + + explicit: """ + Count(Name: table-to-count Key: key-to-count) + """ + + explanation: """ + Count parses the value passed to it in the :Name parameter, and returns the count of characters, elements, or key-value pairs depending on whether the data type passed to it was a string, a sequence, or a table. + This Shard works on both sequences and tables. Parameter :Key applies only to tables. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/dropFront_Query.shs b/ai/fine-tuning-v1/general/dropFront_Query.shs new file mode 100644 index 0000000000..71690e3888 --- /dev/null +++ b/ai/fine-tuning-v1/general/dropFront_Query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I remove the first element in the sequence and return the remaining sequence?""" + + solution: """ + DropFront(sequence-to-drop) + Log("Remaining Sequence") + """ + + explicit: """ + DropFront(Name: sequence-to-drop) + Log(Prefix: "Remaining Sequence") + """ + + explanation: """ + DropFront removes the first element of the sequence variable that has been passed to in the Name parameter. Unlike the PopFront Shard, DropFront will return the remaining + sequence as output. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/drop_Query.shs b/ai/fine-tuning-v1/general/drop_Query.shs new file mode 100644 index 0000000000..9a3d58fca1 --- /dev/null +++ b/ai/fine-tuning-v1/general/drop_Query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I remove the last element in the sequence and return the remaining sequence?""" + + solution: """ + Drop(sequence-to-drop) + Log("Remaining Sequence") + """ + + explicit: """ + Drop(Name: sequence-to-drop) + Log(Prefix: "Remaining Sequence") + """ + + explanation: """ + Drop removes the last element of the sequence variable that has been passed to in the :Name parameter. Unlike the Pop Shard which will return + the popped element, Drop will return the remaining sequence as output. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/erase_query.shs b/ai/fine-tuning-v1/general/erase_query.shs new file mode 100644 index 0000000000..d7af14cc2a --- /dev/null +++ b/ai/fine-tuning-v1/general/erase_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I delete an element in a sequence. """ + + solution: """ + Erase([index-to-delete] sequence-to-delete-from) + """ + + explicit: """ + Erase(Indices:[index-to-delete] Name:sequence-to-delete-from) + """ + + explanation: """ + Erase deletes single or multiple elements (from sequences) and key-value pairs (from tables). + For a sequence, this Shard expects the index (or a sequence of indices in descending order) of the element(s) to be erased, followed by the + name of the sequence variable in the Name parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/erase_query2.shs b/ai/fine-tuning-v1/general/erase_query2.shs new file mode 100644 index 0000000000..46c0e7d777 --- /dev/null +++ b/ai/fine-tuning-v1/general/erase_query2.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I delete multiple elements in a sequence.""" + + solution: """ + Erase([index-to-delete1 index-to-delete2 index-to-delete3] sequence-to-delete-from) + """ + + explicit: """ + Erase(Indices:[index-to-delete1 index-to-delete2 index-to-delete3] Name:sequence-to-delete-from) + """ + + explanation: """ + Erase deletes single or multiple elements (from sequences) and key-value pairs (from tables). + For a sequence, this Shard expects the index (or a sequence of indices in descending order) of the element(s) to be erased, followed by the name of the sequence variable in the Name parameter. + To delete more elements, add the more Indeces to the sequence in the Indeces parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/erase_query3.shs b/ai/fine-tuning-v1/general/erase_query3.shs new file mode 100644 index 0000000000..dfa05b8acb --- /dev/null +++ b/ai/fine-tuning-v1/general/erase_query3.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I delete keys from a table""" + + solution: """ + Erase(["key1" "key2"] sequence-to-delete-from) + """ + + explicit: """ + Erase(Indices:["key1" "key2"] Name:sequence-to-delete-from) + """ + + explanation: """ + Erase deletes single or multiple elements (from sequences) and key-value pairs (from tables). + For a sequence, this Shard expects the index (or a sequence of indices in descending order) of the element(s) to be erased, followed by the name of the sequence variable in the Name parameter. + To delete more keys, add the more keys to the sequence in the Keys parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/exit_query.shs b/ai/fine-tuning-v1/general/exit_query.shs new file mode 100644 index 0000000000..7a05bc70cf --- /dev/null +++ b/ai/fine-tuning-v1/general/exit_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I exit the program through code?""" + + solution: """ + 0;; Error Code + Exit + """ + + explicit: """ + 0;; Error Code + Exit + """ + + explanation: """ + Exit is a Shard that will automatically close the program. It takes in a integer as input. + This integer is usually to denote the error code. + If there is no error code to be used as input use 0. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/expectType_query.shs b/ai/fine-tuning-v1/general/expectType_query.shs new file mode 100644 index 0000000000..165caa8ae2 --- /dev/null +++ b/ai/fine-tuning-v1/general/expectType_query.shs @@ -0,0 +1,58 @@ +{ + prompt: """How do I ensure that the output of a Shard is a specific type?""" + + solution: """ + output-to-check ;; use any of the Shards below to check the required type + Expect(@type (Type::None)) + Expect(@type(Type::Any)) + Expect(@type(Type::Bool)) + Expect(@type(Type::Int)) + Expect(@type(Type::Int2)) + Expect(@type(Type::Int3)) + Expect(@type(Type::Int4)) + Expect(@type(Type::Int8)) + Expect(@type(Type::Int16)) + Expect(@type(Type::Float)) + Expect(@type(Type::Float2)) + Expect(@type(Type::Float3)) + Expect(@type(Type::Float4)) + Expect(@type(Type::Color)) + Expect(@type(Type::Wire)) + Expect(@type(Type::Shard)) + Expect(@type(Type::Bytes)) + Expect(@type(Type::String)) + Expect(@type(Type::Image)) + Expect(@type(Type::Audio)) + """ + + explicit: """ + output-to-check ;; use any of the Shards below to check the required type + Expect(Type:@type(Type::None)) + Expect(Type:@type(Type::Any)) + Expect(Type:@type(Type::Bool)) + Expect(Type:@type(Type::Int)) + Expect(Type:@type(Type::Int2)) + Expect(Type:@type(Type::Int3)) + Expect(Type:@type(Type::Int4)) + Expect(Type:@type(Type::Int8)) + Expect(Type:@type(Type::Int16)) + Expect(Type:@type(Type::Float)) + Expect(Type:@type(Type::Float2)) + Expect(Type:@type(Type::Float3)) + Expect(Type:@type(Type::Float4)) + Expect(Type:@type(Type::Color)) + Expect(Type:@type(Type::Wire)) + Expect(Type:@type(Type::Shard)) + Expect(Type:@type(Type::Bytes)) + Expect(Type:@type(Type::String)) + Expect(Type:@type(Type::Image)) + Expect(Type:@type(Type::Audio)) + """ + + explanation: """ + The expect Shard will take an input and check if it is the stipulated type in the Type parameter.If it is, it will return the input as the stipulated type. + Otherwise, the program will fail. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/forEach_query.shs b/ai/fine-tuning-v1/general/forEach_query.shs new file mode 100644 index 0000000000..704787656c --- /dev/null +++ b/ai/fine-tuning-v1/general/forEach_query.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I do an action for each element in a sequence?""" + + solution: """ + [element1 element2 element3] + | ForEach({ + Math.Add(1) + }) + """ + + explicit: """ + [element1 element2 element3] + | ForEach(Apply:{ + Math.Add(1) + }) + """ + + explanation: """ + For each, processes every element or key-value pair of a sequence/table with a given Shard or sequence of Shards. In the example provided in the solution, + we will add 1 to element1 then element2 and element3. The ForEach Shard will return its input as its output. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/forRange_query.shs b/ai/fine-tuning-v1/general/forRange_query.shs new file mode 100644 index 0000000000..c6ef91b69b --- /dev/null +++ b/ai/fine-tuning-v1/general/forRange_query.shs @@ -0,0 +1,47 @@ +{ + prompt: """How do I do something cumalatively for a specififed range. """ + + solution: """ + 0 >= forRange-each-cycle-value + + ForRange + ( + 1 + 5 + { + = added-value + + forRange-each-cycle-value + Math.Add(added-value) + > forRange-each-cycle-value + + Log("added-value") + } + ) + """ + + explicit: """ + 0 >= forRange-each-cycle-value + + ForRange + ( + From:1 + To:5 + Action:{ + = added-value + + forRange-each-cycle-value + Math.Add(added-value) + > forRange-each-cycle-value + + Log("added-value") + } + ) + """ + + explanation: """ + The ForRange Shard iterates over a range of numbers, feeding each number into the Action parameter and executes the process stated in the Action parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/get_query.shs b/ai/fine-tuning-v1/general/get_query.shs new file mode 100644 index 0000000000..ae96370e1f --- /dev/null +++ b/ai/fine-tuning-v1/general/get_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I read the value of a variable.""" + + solution: + """"value" = variable + + Get(variable) + Log("Variable read")""" + + explicit: + """"value" = variable + + Get(Name: variable) + Log(Prefix: "Variable read")""" + + explanation: """ + Get is used to read the value of an existing variable. All variables that can be created by Set, can be read by Get. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/get_query2.shs b/ai/fine-tuning-v1/general/get_query2.shs new file mode 100644 index 0000000000..491a9fc1bb --- /dev/null +++ b/ai/fine-tuning-v1/general/get_query2.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I read a value of a key from a table.""" + + solution: + """{k1: 1 k2: 2 k3: 3} = table + + Get(table k1 0) + Log("Key read")""" + + explicit: { + {k1: 1 k2: 2 k3: 3} = table + + Get(Name:table Key:k1 Default:0) + Log(Prefix:"Key read") + } + + explanation: """ + Get can be used to read the value of a Key from a table. While the Take Shard can also be used, there is a difference between the two. The difference being, if Get + is trying to read a key that does not exist and no default value is provided, it will throw and error. Take on the otherhand will return none. Unlike Take, Get + can also place a default value through its Default parameter for a key that does not exist yet. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/highest_query.shs b/ai/fine-tuning-v1/general/highest_query.shs new file mode 100644 index 0000000000..021dcfd89b --- /dev/null +++ b/ai/fine-tuning-v1/general/highest_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I get the highest value from a sequence""" + + solution: + """[1 2 3 4 5] = seq + Highest + Log("resulting")""" + + explicit: + """[1 2 3 4 5] = seq + Highest + Log(Prefix:"resulting")""" + + explanation: """ + The Highest shard will parse a sequence and return the element with the highest "value". If it is a sequence of integers or floats it will return the element with + the highest integer or float. If it is a sequence of strings it will return the element with the highest value based on the lexicographical order. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/if_query.shs b/ai/fine-tuning-v1/general/if_query.shs new file mode 100644 index 0000000000..69abf5ab8d --- /dev/null +++ b/ai/fine-tuning-v1/general/if_query.shs @@ -0,0 +1,28 @@ +{ + prompt: """How do I create a conditional statement that will do something when the condition is met and something else when it is not.""" + + solution: """ + variable1 + If(Is(true) { + Pass ;Do Something + } { + Pass ; Else do something else + }) + """ + + explicit: """ + Get(variable1) + If(Predicate:Is(Value: true) Then:{ + Pass ;Do Something + } Else:{ + Pass ;Do Something else + }) + """ + + explanation: """ + The If Shard is a Shard used to create a conditional statement. If the conditions stated in the Predicate parameter is met, it will execute what is stated in + the Then paramater. If the condition is not met, it will execute what is listed in the Else parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/indexOf_query.shs b/ai/fine-tuning-v1/general/indexOf_query.shs new file mode 100644 index 0000000000..c6e8e26c59 --- /dev/null +++ b/ai/fine-tuning-v1/general/indexOf_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I find the index number of a specific element in a sequence?""" + + solution: """ + sequence + |IndexOf(item-to-find) + > index-of-item + """ + + explicit: """ + Get(Name:sequence) + IndexOf(Item: item-to-find) + Update(Name: index-of-item) + """ + + explanation: """ + Index of will take a sequence as an input and search through the sequence until it finds an exact match of the item stated in the Item parameter. Once a match + has been found, it will return the index of the matched item. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAllLessEqual_query.shs b/ai/fine-tuning-v1/general/isAllLessEqual_query.shs new file mode 100644 index 0000000000..09a7b098c0 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAllLessEqual_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if every value in a sequence is less or equal to a certain value.""" + + solution: """ + [1 2 3 4 5 6 7] = sequence + + sequence + If(IsAllLessEqual(7) {Msg("all matches")} {Msg("not all matches")}) + """ + + explicit: """ + [1 2 3 4 5 6 7] = sequence + + sequence + If(Predicat: IsAllLessEqual(Value: 7) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAllLessEqual Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through + a sequence and check if every element is lesser than the value stated in the Value parameter. If all elements are of lower or equal value, it will return true, + otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. + The value placed in the Value parameter must be of the same data type as the input. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAllLess_query.shs b/ai/fine-tuning-v1/general/isAllLess_query.shs new file mode 100644 index 0000000000..11fd190d78 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAllLess_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if every value in a sequence is less than a certain value.""" + + solution: """ + [1 2 3 4 5 6] = sequence + + sequence + If(IsAllLess(7) {Msg("all matches")} {Msg("not all matches")}) + """ + + explicit: """ + [1 2 3 4 5 6] = sequence + + sequence + If(Predicat: IsAllLess(Value: 7) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAllLess Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through + a sequence and check if every element is lesser than the value stated in the Value parameter. If all elements are of lower value, it will return true, + otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. + The value placed in the Value parameter must be of the same data type as the input. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAllMoreEqual_query.shs b/ai/fine-tuning-v1/general/isAllMoreEqual_query.shs new file mode 100644 index 0000000000..45f885fa41 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAllMoreEqual_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if every value in a sequence is more or equal to a certain value.""" + + solution: """ + [1 2 3 4 5 6] = sequence + + sequence + If(IsAllMoreEqual(1) {Msg("all matches")} {Msg("not all matches")}) + """ + + explicit: """ + [1 2 3 4 5 6] = sequence + + sequence + If(Predicat: IsAllMoreEqual(Value: 1) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAllMoreEqual Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through + a sequence and check if every element is more or equal to the value stated in the Value parameter. If all elements are of higher or equal value, it will return true, + otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. + The value placed in the Value parameter must be of the same data type as the input. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAllMore_query.shs b/ai/fine-tuning-v1/general/isAllMore_query.shs new file mode 100644 index 0000000000..5a008dfa70 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAllMore_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if every value in a sequence is more than a certain value.""" + + solution: """ + [1 2 3 4 5 6] = sequence + + sequence + If(IsAllMore(0) {Msg("all matches")} {Msg("not all matches")}) + """ + + explicit: """ + [1 2 3 4 5 6] = sequence + + sequence + If(Predicat: IsAllMore(Value: 0) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAllMore Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through + a sequence and check if every element is more than the value stated in the Value parameter. If all elements are of higher value, it will return true, + otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. + The value placed in the Value parameter must be of the same data type as the input. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAllNot_query.shs b/ai/fine-tuning-v1/general/isAllNot_query.shs new file mode 100644 index 0000000000..022c74e34a --- /dev/null +++ b/ai/fine-tuning-v1/general/isAllNot_query.shs @@ -0,0 +1,29 @@ +{ + prompt: """How do I check if every value in a sequence does not equal somthing""" + + solution: """ + [2 2 2 2 2 2 2] = sequence + + sequence + If(IsAllNot(3) {Msg("all matches")} {Msg("not all matches")}) + """ + + explicit: """ + [2 2 2 2 2 2 2] = sequence + + sequence + If(Predicat: IsAllNot(Value: 3) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAllNot Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. It will parse through + a sequence and check if every element does not match the value stated in the Value parameter. If all elements does not match, it will return true, + otherwise, it will return false. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAll_query.shs b/ai/fine-tuning-v1/general/isAll_query.shs new file mode 100644 index 0000000000..97696a0928 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAll_query.shs @@ -0,0 +1,29 @@ +{ + prompt: """How do I check if every value in a sequence equals something.""" + + solution: """ + [2 2 2 2 2 2 2] = sequence + + sequence + If(IsAll(2) {Msg("all matches")} {Msg("not all matches")}) + """ + + explicit: """ + [2 2 2 2 2 2 2] = sequence + + sequence + If(Predicat: IsAll(Value: 2) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAll Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. It will parse through + a sequence and check if every element matches the value stated in the Value parameter. If all elements matches, it will return true, + otherwise, it will return false. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAlmost.shs b/ai/fine-tuning-v1/general/isAlmost.shs new file mode 100644 index 0000000000..6b4d5ede38 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAlmost.shs @@ -0,0 +1,35 @@ +{ + prompt: """How do I check if something is Almost a certain value """ + + solution: """ + 0 >= value + + value | Math.Add(1) > value + + value + If(IsAlmost(10 1) {Msg("almost 10!")} {Msg("not there yet!")}) + """ + + explicit: """ + 0 >= value + + value | Math.Add(1) > value + + Get(value) + If(Predicate: IsAlmost(Value: 10 Treshold:1) Then:{ + Msg("all matches") + } Else: { + Msg("not all matches")} + ) + """ + + explanation: """ + The IsAlmost Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will check if the input is near to the value stated in the Value parameter besed on the Treshold parameter. If the input + value is nearing the value provided in the Value parameter, the Shard will return true, otherwise, it will return false. + The input can be of any number type or a sequence of such types. If the Shard is comparing between two numeric sequences, it will compare the elements + of the input sequence with the corresponding indexed element in the sequence provided into the the Value parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAnyLessEqual_query.shs b/ai/fine-tuning-v1/general/isAnyLessEqual_query.shs new file mode 100644 index 0000000000..48b6bffdd9 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAnyLessEqual_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if any value in a sequence is of lower value or equal to something.""" + + solution: """ + [3 3 3 3 2] = sequence + + sequence + If(IsAnyLessEqual(2) {Msg("one match")} {Msg("none match")}) + """ + + explicit: """ + [3 3 3 3 2] = sequence + + sequence + If(Predicat: IsAnyLessEqual(Value: 2) Then:{ + Msg("one match") + } Else: { + Msg("none match")} + ) + """ + + explanation: """ + The IsAnyLessEqual is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will parse through a sequence and check if any of the elements in the sequence is of lower value or equal to the value provided in + the Value parameter. If at least one element is of lower or equal to the value, the Shard will return true, otherwise, it will return false. + The data type provided as input and provided in the Value Parameter must be of the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAnyLess_query.shs b/ai/fine-tuning-v1/general/isAnyLess_query.shs new file mode 100644 index 0000000000..18fb46e1f8 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAnyLess_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if any value in a sequence is of lower value than something.""" + + solution: """ + [3 3 3 3 1] = sequence + + sequence + If(IsAnyLess(2) {Msg("one match")} {Msg("none match")}) + """ + + explicit: """ + [3 3 3 3 1] = sequence + + sequence + If(Predicat: IsAnyLess(Value: 2) Then:{ + Msg("one match") + } Else: { + Msg("none match")} + ) + """ + + explanation: """ + The IsAnyLess Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will parse through a sequence and check if any of the elements in the sequence is of lower value than the value provided in + the Value parameter. If at least one element is of lower value, the Shard will return true, otherwise, it will return false. + The data type provided as input and provided in the Value Parameter must be of the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAnyMoreEqual_query copy.shs b/ai/fine-tuning-v1/general/isAnyMoreEqual_query copy.shs new file mode 100644 index 0000000000..1316c9bcf9 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAnyMoreEqual_query copy.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if any value in a sequence is of higher value or equal to something.""" + + solution: """ + [1 1 1 1 2] = sequence + + sequence + If(IsAnyMoreEqual(2) {Msg("one match")} {Msg("none match")}) + """ + + explicit: """ + [1 1 1 1 2] = sequence + + sequence + If(Predicat: IsAnyMoreEqual(Value: 2) Then:{ + Msg("one match") + } Else: { + Msg("none match")} + ) + """ + + explanation: """ + The IsAnyMoreEqual is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will parse through a sequence and check if any of the elements in the sequence is of higher value or equal to the value provided in + the Value parameter. If at least one element is of higher value or equal to the value, the Shard will return true, otherwise, it will return false. + The data type provided as input and provided in the Value Parameter must be of the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAnyMore_query.shs b/ai/fine-tuning-v1/general/isAnyMore_query.shs new file mode 100644 index 0000000000..b5989a8549 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAnyMore_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if any value in a sequence is of higher value than something.""" + + solution: """ + [1 1 1 1 3] = sequence + + sequence + If(IsAnyMore(2) {Msg("one match")} {Msg("none match")}) + """ + + explicit: """ + [1 1 1 1 3] = sequence + + sequence + If(Predicat: IsAnyMore(Value: 2) Then:{ + Msg("one match") + } Else: { + Msg("none match")} + ) + """ + + explanation: """ + The IsAnyMore is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will parse through a sequence and check if any of the elements in the sequence is of higher value than the value provided in + the Value parameter. If at least one element is of higher value, the Shard will return true, otherwise, it will return false. + The data type provided as input and provided in the Value Parameter must be of the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAnyNot_query.shs b/ai/fine-tuning-v1/general/isAnyNot_query.shs new file mode 100644 index 0000000000..5363042c22 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAnyNot_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if any value in a sequence is not equal to something.""" + + solution: """ + [1 1 1 1 2] = sequence + + sequence + If(IsAnyNot(1) {Msg("one match")} {Msg("none match")}) + """ + + explicit: """ + [1 1 1 1 2] = sequence + + sequence + If(Predicat: IsAnyNot(Value: 1) Then:{ + Msg("one match") + } Else: { + Msg("none match")} + ) + """ + + explanation: """ + The IsAnyNot is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will parse through a sequence and check if any of the elements in the sequence is not of equal value to the value provided in + the Value parameter. If at least one element is not of equal value, the Shard will return true, otherwise, it will return false. + The data type provided as input and provided in the Value Parameter must be of the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isAny_query.shs b/ai/fine-tuning-v1/general/isAny_query.shs new file mode 100644 index 0000000000..ca3b8d74b4 --- /dev/null +++ b/ai/fine-tuning-v1/general/isAny_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I check if any value in a sequence equals something.""" + + solution: """ + [1 2 3 4 5 6] = sequence + + sequence + If(IsAny(2) {Msg("one match")} {Msg("none match")}) + """ + + explicit: """ + [1 2 3 4 5 6] = sequence + + sequence + If(Predicat: IsAny(Value: 2) Then:{ + Msg("one match") + } Else: { + Msg("none match")} + ) + """ + + explanation: """ + The IsAny Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. + It will parse through a sequence and check if any of the elements in the sequence matches the value provided in the Value parameter. + If at least one element matches the value, the Shard will return true, otherwise, it will return false. + The data type provided as input and provided in the Value Parameter must be of the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isLessEqual_query.shs b/ai/fine-tuning-v1/general/isLessEqual_query.shs new file mode 100644 index 0000000000..1c12ef12e7 --- /dev/null +++ b/ai/fine-tuning-v1/general/isLessEqual_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I check if something is less than or equals to something else.""" + + solution: """ + variable1 + When(IsLessEqual(variable2) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate: IsLessEqual(Value: variable2) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsLessEqual Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is less than or equals to what is + stated in the Value parameter of the Is Shard. In this case, if variable 1 is less than or equals to variable2, the When Shard's Predicate will return true and do what is stated + in Action. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isLess_query.shs b/ai/fine-tuning-v1/general/isLess_query.shs new file mode 100644 index 0000000000..4ebb4c150a --- /dev/null +++ b/ai/fine-tuning-v1/general/isLess_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I check if something is less than something else.""" + + solution: """ + variable1 + When(IsLess(variable2) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:IsLess(Value: variable2) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsLess Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is less than what is + stated in the Value parameter of the Is Shard. In this case, if variable 1 is less than variable2, the When Shard's Predicate will return true and do what is stated + in Action. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isMoreEqual_query.shs b/ai/fine-tuning-v1/general/isMoreEqual_query.shs new file mode 100644 index 0000000000..911d1c8287 --- /dev/null +++ b/ai/fine-tuning-v1/general/isMoreEqual_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I check if something is greater than something else.""" + + solution: """ + variable1 + When(IsMoreEqual(variable2) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:IsMoreEqual(Value: variable2) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsMoreEqual Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is greater than what is + stated in the Value parameter of the Is Shard. In this case, if variable 1 is greater than or equal to variable2, the When Shard's Predicate will return true and do what is stated + in Action. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isMore_query.shs b/ai/fine-tuning-v1/general/isMore_query.shs new file mode 100644 index 0000000000..ed417d32dd --- /dev/null +++ b/ai/fine-tuning-v1/general/isMore_query.shs @@ -0,0 +1,25 @@ +{ + prompt: """How do I check if something is greater than something else.""" + + solution: """ + variable1 + When(IsMore(variable2) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:IsMore(Value: variable2) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsMore Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is greater than what is + stated in the Value parameter of the Is Shard. In this case, if variable1 is greater than variable2, the When Shard's Predicate will return true and do what is stated + in Action. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isNone_query.shs b/ai/fine-tuning-v1/general/isNone_query.shs new file mode 100644 index 0000000000..d631ff2857 --- /dev/null +++ b/ai/fine-tuning-v1/general/isNone_query.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I check if something is none.""" + + solution: """ + variable1 + When(IsNone { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:IsNone Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsNone Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional shard is none. + In the solution above, if variable1 is none, the When Shard's Predicate will return true and do what is stated in Action. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isNotNone_query.shs b/ai/fine-tuning-v1/general/isNotNone_query.shs new file mode 100644 index 0000000000..a9fae4637f --- /dev/null +++ b/ai/fine-tuning-v1/general/isNotNone_query.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I check if something is not none.""" + + solution: """ + variable1 + When(IsNotNone { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:IsNotNone Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsNone Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is not none. + In the solution above, if variable1 is not none, the When Shard's Predicate will return true and do what is stated in Action. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isNot_query.shs b/ai/fine-tuning-v1/general/isNot_query.shs new file mode 100644 index 0000000000..28dc7eee31 --- /dev/null +++ b/ai/fine-tuning-v1/general/isNot_query.shs @@ -0,0 +1,27 @@ +{ + prompt: """How do I check if something is not something else.""" + + solution: """ + variable1 + When(IsNot(variable2) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:IsNot(Value: variable2) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The IsNot Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard does not match with what is + stated in the Value parameter of the Is Shard. In the solution above, if variable 1 does not equal variable2, the When Shard's Predicate will return true and execute what is stated + in Action. + + If the input and Value parameter have different data types they will be assessed as inequal by default even if they are numerically equal (for example int 5 is not equal to float 5.0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isRunning.shs b/ai/fine-tuning-v1/general/isRunning.shs new file mode 100644 index 0000000000..51a10f2eb0 --- /dev/null +++ b/ai/fine-tuning-v1/general/isRunning.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do i check if a wire is running.""" + + solution: """ + IsRunning(wire-to-check) + Log("Is wire running") + """ + + explicit: """ + IsRunning(Wire: wire-to-check) + Log(Prefix: "Is wire running") + """ + + explanation: """ + The IsRunning shard will check if the wire stated in the Wire parameter is running. If it is running, it will return true, and false otherwise. In the solution + provided above, it will check if wire-to-check is running and the output will be Logged through the log shard. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/isType_query.shs b/ai/fine-tuning-v1/general/isType_query.shs new file mode 100644 index 0000000000..e73cf6096a --- /dev/null +++ b/ai/fine-tuning-v1/general/isType_query.shs @@ -0,0 +1,52 @@ +{ + prompt: """How do I check if a variable is a certain type?""" + + solution: """ + variable-to-check ;; use any of the Shards below to check the required type + IsAudio + IsBool + IsBytes + IsColor + IsFloat + IsFloat2 + IsFloat3 + IsFloat4 + IsImage + IsInt + IsInt2 + IsInt3 + IsInt4 + IsSeq + IsString + IsTable + IsWire + """ + + explicit: """ + Get(variable-to-check) ;; use any of the Shards below to check the required type + IsAudio + IsBool + IsBytes + IsColor + IsFloat + IsFloat2 + IsFloat3 + IsFloat4 + IsImage + IsInt + IsInt2 + IsInt3 + IsInt4 + IsSeq + IsString + IsTable + IsWire + """ + + explanation: """ + The Shards listed above all take in an input and check if they are the corresponding type. They then return true or false accordingly. + They can also be used in the Predicate parameter of conditional Shards like If and When. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/is_query.shs b/ai/fine-tuning-v1/general/is_query.shs new file mode 100644 index 0000000000..08a7ada3ba --- /dev/null +++ b/ai/fine-tuning-v1/general/is_query.shs @@ -0,0 +1,27 @@ +{ + prompt: """How do I check if something equals something else.""" + + solution: """ + variable1 + When(Is(variable2) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(Name:variable1) + When(Predicate:Is(Value: variable2) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The Is Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard matches with what is + stated in the Value parameter of the Is Shard. In this case, if variable 1 matches variable2, the When Shard's Predicate will return true and do what is stated + in action. + + If the input and Value parameter have different data types they will be assessed as inequal by default even if they are numerically equal (for example int 5 is not equal to float 5.0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/limit_query.shs b/ai/fine-tuning-v1/general/limit_query.shs new file mode 100644 index 0000000000..e97675aa04 --- /dev/null +++ b/ai/fine-tuning-v1/general/limit_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do process a sequence but process only some parts of a sequence.""" + + solution: """ + [1 2 3 4 5] = sequence + + sequence + Limit(3) + | ForEach({ + Math.Add(1) + }) + """ + + explicit: """ + [1 2 3 4 5] = sequence + + sequence + Limit(Max:3) + | ForEach(Apply:{ + Math.Add(1) + }) + """ + + explanation: """ + The Limit Shard takes a sequence as an input and outputs a cut sequence whose length is what is stated in the Max parameter. In the scenario provided under solution, + the Limit Shard will output [1 2 3] and the ForEach Shard will only process these 3 elements. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/loadImage.shs b/ai/fine-tuning-v1/general/loadImage.shs new file mode 100644 index 0000000000..b610ac70d3 --- /dev/null +++ b/ai/fine-tuning-v1/general/loadImage.shs @@ -0,0 +1,17 @@ +{ + prompt: """How do I load an image.""" + + solution: + """LoadImage(File:filename.png PremultiplyAlpha: true) | GFX.Texture""" + + explicit: + """LoadImage(File:filename.png PremultiplyAlpha: true) | GFX.Texture""" + + explanation: """ + The LoadImage Shard will output the imge specified in the File parameter. The Premultiplied parameter is switched on or aff depending on + wether the image selected does or does not have alpha. In the case provided under solution, we are feeding the output of the + LoadImage Shard into GFX.Texture for the image to be used as a texture. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/log-query.shs b/ai/fine-tuning-v1/general/log-query.shs new file mode 100644 index 0000000000..f92c28832f --- /dev/null +++ b/ai/fine-tuning-v1/general/log-query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I log the type of something in the console""" + + solution: """ + variable-to-log + Log("Is wire running") + """ + + explicit: """ + Get(variable-to-log) + Log(Prefix: "Is wire running") + """ + + explanation: """ + This Shard is used for printing information to the console for debugging purposes. + It can also prefix a message string to the logged output while displaying it in the console. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/logType_query.shs b/ai/fine-tuning-v1/general/logType_query.shs new file mode 100644 index 0000000000..1ab68b565b --- /dev/null +++ b/ai/fine-tuning-v1/general/logType_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I log the type of a variable in the console""" + + solution: """ + variable-to-log + LogType("Is wire running") + """ + + explicit: """ + Get(variable-to-log) + LogType(Prefix: "Is wire running") + """ + + explanation: """ + Prints the type of the passed variable to the console. + It can also prefix a message string to the logged output while displaying it in the console. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/lowest_query.shs b/ai/fine-tuning-v1/general/lowest_query.shs new file mode 100644 index 0000000000..a86e5402a5 --- /dev/null +++ b/ai/fine-tuning-v1/general/lowest_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do i get the lowest value from a table ?""" + + solution: + """[1 2 3 4 5] = seq + Lowest + Log("resulting")""" + + explicit: + """[1 2 3 4 5] = seq + Lowest + Log(Prefix:"resulting")""" + + explanation: """ + The Lowest Shard will parse a sequence and return the element with the lowest "value". If it is a sequence of integers or floats it will return the element with + the lowest integer or float. If it is a sequence of strings it will return the element with the lowest value based on the lexicographical order. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/map_query.shs b/ai/fine-tuning-v1/general/map_query.shs new file mode 100644 index 0000000000..d6f4a7a4a3 --- /dev/null +++ b/ai/fine-tuning-v1/general/map_query.shs @@ -0,0 +1,35 @@ +{ + prompt: """How do I do an action for each element in a sequence and get the modified sequence?""" + + solution: """ + [1 2 3 4 5] = sequence + + sequence + Map( + Apply:{ + Math.Add(1) + Log("result-map-each-element") + } + ) + Log("result-map-modified-sequence") + """ + + explicit: """ + [1 2 3 4 5] = sequence + + Get(Name:sequence) + Map( + Apply:{ + Math.Add(1) + Log(Prefix:"result-map-each-element") + } + ) + Log(Prefix:"result-map-modified-sequence") + """ + + explanation: """ + Map, processes every element of a sequence with a given Shard or sequence of Shards. Unlike the ForEach Shard, Map will output the resulting modified sequence. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/match_query.shs b/ai/fine-tuning-v1/general/match_query.shs new file mode 100644 index 0000000000..3557f0260d --- /dev/null +++ b/ai/fine-tuning-v1/general/match_query.shs @@ -0,0 +1,56 @@ +{ + prompt: """How do I compare an input with multiple cases an execute ones that are true.""" + + solution: """ + 1 = value + + value + Match([ + 1 { + Log("value is 1") + } + + 2 { + Log("value is 2") + } + + 3 { + Log("value is 3") + } + ] + false) + """ + + explicit: """ + 1 = value + + value + Match( Cases: [ + 1 { + Log("value is 1") + } + + 2 { + Log("value is 2") + } + + 3 { + Log("value is 3") + } + ] + Passthrough: false) + """ + + explanation: """ + The Match Shard Compares the input with the declared cases (in order of the declaration) and activates the shard of the first matched case. If there are no matched + cases, the program will panic. + + The Passthrough parameter set to true will allow the original input (the one that was used to match against every case in the shard) to be returned as the final + output of Match, irrespective of the case match results. Setting Passthrough to false will enable the matched case's shard output to be returned as the final + output of Match. + + However, for Passthrough to work correctly, the data types of the shard input and the shard's case outputs must match. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/max_query.shs b/ai/fine-tuning-v1/general/max_query.shs new file mode 100644 index 0000000000..af5ec3a93d --- /dev/null +++ b/ai/fine-tuning-v1/general/max_query.shs @@ -0,0 +1,37 @@ +{ + prompt: """How do i change all the low values in a sequence to another value.""" + + solution: + """[1 2 3 4 5] >= sequence + + sequence + Max(Operand: 3) ;; change the operand accordingly to the desirec value + > sequence + Log("resulting sequence") + ;; [3 3 3 4 5] + """ + + explicit: + """[1 2 3 4 5] >= sequence + + sequence + Max(Operand: 3) ;; change the operand accordingly to the desirec value + > sequence + Log("resulting sequence") + ;; [3 3 3 4 5] + """ + + explanation: """ + This Shard compares the input to its Operand parameter and outputs the greater of the two values. + + If the input is a sequence and the Operand parameter a single number, each input element is compared with the Operand parameter and the greater value from each comparison is collected and output as a sequence. + + If the input and Operand parameter both are sequences, each element of the input sequence is compared with the corresponding-index element in the Operand parameter sequence and the greater value from each comparison is collected and output as a sequence. + + If the input sequence is smaller in size than the Operand parameter sequence the comparison stops with the last element of the input sequence. If the Operand parameter sequence is smaller the remaining input sequence elements loop over the Operand parameter sequence till all input sequence elements have been compared. + + This Shard works only on numbers (integers, floats) and on sequences of such numbers. The data types of the input and the Operand parameters must match. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/maybe_query.shs b/ai/fine-tuning-v1/general/maybe_query.shs new file mode 100644 index 0000000000..dacc419927 --- /dev/null +++ b/ai/fine-tuning-v1/general/maybe_query.shs @@ -0,0 +1,32 @@ +{ + prompt: """How do I attempt to execute an action but do another action if I fail""" + + solution: + """[1 2 3] = sequence + + sequence + Maybe( + Shards: Take(3) + Else: Take(0) + Silent: false + ) + Log("result")""" + + explicit: + """[1 2 3] = sequence + + sequence + Maybe( + Shards: Take(3) + Else: Take(0) + Silent: false + ) + Log("result")""" + + explanation: """ + The Maybe Shard attempts to activate a Shard or a sequence of Shards. Upon failure, it will activate another Shard or sequence of Shards specified in the Else parameter. + If set to true, the Silent parameter will disable logging while running the Shard and no warning message should be printed on failure. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/merge_query.shs b/ai/fine-tuning-v1/general/merge_query.shs new file mode 100644 index 0000000000..b0df96f79a --- /dev/null +++ b/ai/fine-tuning-v1/general/merge_query.shs @@ -0,0 +1,26 @@ +{ + prompt: """How do I combine two tables together?""" + + solution: + """{k1: 1 k2: 2 k3: 3} >= table1 + {k4: 4 k5: 5 k6: 6} >= table2 + + table2 + Merge(table1) + Log("resulting table")""" + + explicit: + """{k1: 1 k2: 2 k3: 3} >= table1 + {k4: 4 k5: 5 k6: 6} >= table2 + + Get(Name:table2) + Merge(Target:table1) + Log(Prefix:"resulting table")""" + + explanation: """ + Merge, combines two tables into one, with the input table taking priority over the table passed into the Target parameter. That is, if table2 has similar keys to table1 + the output table will have table2's value for those similar keys. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/min_query.shs b/ai/fine-tuning-v1/general/min_query.shs new file mode 100644 index 0000000000..4eca2ea13a --- /dev/null +++ b/ai/fine-tuning-v1/general/min_query.shs @@ -0,0 +1,35 @@ +{ + prompt: """How do i change all the low values in a sequence to another value.""" + + solution: + """[1 2 3 4 5] >= sequence + + sequence + Min(Operand: 3) ;; change the operand accordingly to the desirec value + > sequence + Log("resulting sequence") + ;; [3 3 3 4 5]""" + + explicit: + """[1 2 3 4 5] >= sequence + + sequence + Min(Operand: 3) ;; change the operand accordingly to the desirec value + > sequence + Log("resulting sequence") + ;; [3 3 3 4 5]""" + + explanation: """ + This shard compares the input to its Operand parameter and outputs the lesser of the two values. + + If the input is a sequence and the Operand parameter a single number, each input element is compared with the Operand parameter and the lesser value from each comparison is collected and output as a sequence. + + If the input and Operand parameter both are sequences, each element of the input sequence is compared with the corresponding-index element in the Operand parameter sequence and the lesser value from each comparison is collected and output as a sequence. + + If the input sequence is smaller in size than the Operand parameter sequence the comparison stops with the last element of the input sequence. If the Operand parameter sequence is smaller the remaining input sequence elements loop over the Operand parameter sequence till all input sequence elements have been compared. + + This shard works only on numbers (integers, floats) and on sequences of such numbers. The data types of the input and the Operand parameters must match. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/msg_query.shs b/ai/fine-tuning-v1/general/msg_query.shs new file mode 100644 index 0000000000..f029bc9c1a --- /dev/null +++ b/ai/fine-tuning-v1/general/msg_query.shs @@ -0,0 +1,18 @@ +{ + prompt: """How do I display a message on the console""" + + solution: + """Msg("Type your message here")""" + + explicit: + """Msg(Message:"Type your message here")""" + + explanation: """ + This Shard is used for displaying messages to the user on the standard output (which is usually the console). + The message to display can be passed to this Shard either as a string or as a string variable holding a value. + In case a variable is passed the Shard displays the variable's value. + Unlike Log, Msg does not print its input. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/once_query.shs b/ai/fine-tuning-v1/general/once_query.shs new file mode 100644 index 0000000000..595edc06bf --- /dev/null +++ b/ai/fine-tuning-v1/general/once_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I execute something only once""" + + solution: + """Once({ + Msg("This will only execute once") + })""" + + explicit: + """Once( Action:{ + Msg("This will only execute once") + } Every: 0)""" + + explanation: """ + When the Once Shard has 0 in the Every parameter, it will execute what is stated in the Action parameter only once per flow execution. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/once_query2.shs b/ai/fine-tuning-v1/general/once_query2.shs new file mode 100644 index 0000000000..cb46beba8e --- /dev/null +++ b/ai/fine-tuning-v1/general/once_query2.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I execute something once every few seconds.""" + + solution: + """Once({ + Msg("This will only execute once") + } 1.0)""" + + explicit: + """Once( Action:{ + Msg("This will only execute once") + } Every: 1.0)""" + + explanation: """ + The Once shard will execute what is stated in the Action parameter every X amount of seconds, where X is the number stated in the Every parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/or_query.shs b/ai/fine-tuning-v1/general/or_query.shs new file mode 100644 index 0000000000..f4ebe72736 --- /dev/null +++ b/ai/fine-tuning-v1/general/or_query.shs @@ -0,0 +1,26 @@ +{ + prompt: """How do I create a conditional statement with more than one conditon, that returns true when either of its predicates is fulfilled.""" + + solution: + """2 = variable + + variable + When({Is(1) | Or | variable | Is(2)} { + Log("condition met") + })""" + + explicit: + """2 = variable + + Get(variable) + When(Predicate:{Is(1) | Or | Get(variable) | Is(2)} Action:{ + Log("condition met") + })""" + + explanation: """ + The Or statement is a Shard that is used to chain multiple Conditional statements together. If either of the conditions chained are met, + the Predicate parameter will return true and execute what is dictated in the Action Parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/pass_query.shs b/ai/fine-tuning-v1/general/pass_query.shs new file mode 100644 index 0000000000..688598782b --- /dev/null +++ b/ai/fine-tuning-v1/general/pass_query.shs @@ -0,0 +1,27 @@ +{ + prompt: """How do I have an action that does nothing.""" + + solution: + """ + 2 = variable + + variable + When({Is(2)} { + Pass + }) + """ + + explicit: + """2 = variable + + Get(variable) + When(Predicate:{Is(2)} Action:{ + Pass + })""" + + explanation: """ + The Pass Shard makes an action parameter do nothing and return back its input. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/popFront_query.shs b/ai/fine-tuning-v1/general/popFront_query.shs new file mode 100644 index 0000000000..c18aa1f6d3 --- /dev/null +++ b/ai/fine-tuning-v1/general/popFront_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I remove the first element in the sequence and get the element that was removed?""" + + solution: """ + PopFront(sequence-to-drop) + Log("Remaining Sequence") + """ + + explicit: """ + PopFront(Name: sequence-to-drop) + Log(Prefix: "Remaining Sequence") + """ + + explanation: """ + PopFront removes the first element of the sequence variable that has been passed to in the :Name parameter. Unlike the Drop Shard, Pop will return the popped element + as output. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/pop_query.shs b/ai/fine-tuning-v1/general/pop_query.shs new file mode 100644 index 0000000000..41c6872b0b --- /dev/null +++ b/ai/fine-tuning-v1/general/pop_query.shs @@ -0,0 +1,20 @@ +{ + prompt: """How do I remove the last element in the sequence and get the element that was removed?""" + + solution: """ + Pop(sequence-to-drop) + Log("Remaining Sequence") + """ + + explicit: """ + Pop(Name: sequence-to-drop) + Log(Prefix: "Remaining Sequence") + """ + + explanation: """ + Pop removes the last element of the sequence variable that has been passed to in the :Name parameter. Unlike the Drop Shard, which will return + the modified sequence, Pop will return the popped element as output. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/prependTo_query.shs b/ai/fine-tuning-v1/general/prependTo_query.shs new file mode 100644 index 0000000000..5aba87b7ba --- /dev/null +++ b/ai/fine-tuning-v1/general/prependTo_query.shs @@ -0,0 +1,26 @@ +{ + prompt: """How do add something to thhe front of a sequence.""" + + solution: + """ + [1 2 3 4 5] >= sequence + 0 | PrependTo(sequence) + + sequence + Log("result") + """ + + explicit: + """[1 2 3 4 5] >= sequence + 0 | PrependTo(Collection: sequence) + + sequence + Log(Prefix: "result")""" + + explanation: """ + PrependTo will add what is inputed to the sequence stated in the Collection parameter. The PrependTo shard will not output the resulting sequence but still modify it. + Ensure that the input type matches the sequence type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/push_query.shs b/ai/fine-tuning-v1/general/push_query.shs new file mode 100644 index 0000000000..0789dbfa2e --- /dev/null +++ b/ai/fine-tuning-v1/general/push_query.shs @@ -0,0 +1,18 @@ +{ + prompt: """How to add a new element to an existing Shards sequence?""" + + solution: """ + element >> sequence + """ + + explicit: """ + Get(element) | Push(sequence) + """ + + explanation: """ + The Push method is used to add a new element to the end of a sequence. The type of element being pushed must be pushed into a sequence of the same + types of elements. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/randomByte.shs b/ai/fine-tuning-v1/general/randomByte.shs new file mode 100644 index 0000000000..02e66e0b78 --- /dev/null +++ b/ai/fine-tuning-v1/general/randomByte.shs @@ -0,0 +1,17 @@ +{ + prompt: """How do I get a random integer.""" + + solution: """ + RandomInt(50) ;; Replace with desired size + """ + + explicit: """ + RandomInt(Size: 50) ;; Replace with desired size + """ + + explanation: """ + The RandomBytes Shard will return randomized bytes, of the size specified in the Size parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/randomFloat_query.shs b/ai/fine-tuning-v1/general/randomFloat_query.shs new file mode 100644 index 0000000000..0541dcf76f --- /dev/null +++ b/ai/fine-tuning-v1/general/randomFloat_query.shs @@ -0,0 +1,19 @@ +{ + prompt: """How do I get a random float""" + + solution: """ + RandomFloat(50.0) ;; Replace with desired Max, non-inlcusive + """ + + explicit: """ + RandomFloat(Max: 50.0) ;; Replace with desired Max, non-inlcusive + """ + + explanation: """ + The RandomInt Shard will return a random integer between the values 0 and the value specified in the Max parameter (non-inclusive). + The returned float will always be to the 4th decimal place. Use Math.Add or Math.Subtract to modify the lower limit. + For example, to get a random integer from the range of 2.0-50.0 you can use the RandomFloat(48.0) | Math.Add(2.0). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/randomInt_query.shs b/ai/fine-tuning-v1/general/randomInt_query.shs new file mode 100644 index 0000000000..b23d1c786b --- /dev/null +++ b/ai/fine-tuning-v1/general/randomInt_query.shs @@ -0,0 +1,18 @@ +{ + prompt: """How do I get a random integer.""" + + solution: """ + RandomInt(50) ;; Replace with desired Max, non-inlcusive + """ + + explicit: """ + RandomInt(Max: 50) ;; Replace with desired Max, non-inlcusive + """ + + explanation: """ + The RandomInt Shard will return a random integer between the values 0 and the value specified in the Max parameter (non-inclusive). Use Math.Add or Math.Subtract + to modify the lower limit. For example, to get a random integer from the range of 2-50 you can use the RandomInt(48) | Math.Add(2). + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/repeat_query.shs b/ai/fine-tuning-v1/general/repeat_query.shs new file mode 100644 index 0000000000..7f3df068ca --- /dev/null +++ b/ai/fine-tuning-v1/general/repeat_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I repeat something multiple times.""" + + solution: """ + Repeat({ + Pass ;; Action to repeat + } 5) + """ + + explicit: """ + Repeat(Action:{ + Pass ;; Action to repeat + } Times: 5) + """ + + explanation: """ + Repeat will execute whatever is specified in the Action parameter X number of times, where X is the amount specified in the Times parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/repeat_query2.shs b/ai/fine-tuning-v1/general/repeat_query2.shs new file mode 100644 index 0000000000..cedafb3ada --- /dev/null +++ b/ai/fine-tuning-v1/general/repeat_query2.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I repeat something multiple times until a certain condition is false.""" + + solution: """ + + 0 >= n + + Repeat({ + n | Math.Add(1) > n + } + true + {n | IsMore(3)}) + """ + + explicit: """ + 0 | Set(Name:n) + + Repeat( Action:{ + n | Math.Add(1) > n + } + Forever: true + Until: n | IsMore(3)) + """ + + explanation: """ + Repeat will execute whatever is specified in the Action parameter forever until the condition specified in the Until parameter is met. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/replace_Query.shs b/ai/fine-tuning-v1/general/replace_Query.shs new file mode 100644 index 0000000000..dcc35a12f8 --- /dev/null +++ b/ai/fine-tuning-v1/general/replace_Query.shs @@ -0,0 +1,33 @@ +{ + prompt: """How do I replace a elements in a sequence.""" + + solution: """ + [ 0 1 2 3 4 5] >= sequence + + sequence + Replace( + [1] + [2] + ) + Log("result") + """ + + explicit: """ + [ 0 1 2 3 4 5] >= sequence + + Get(sequence) + Replace( + Patterns: [1 4] + Replacements: [2 2] + ) + Log(Prefix:"result") ;; Result will be + """ + + explanation: """ + The Replace Shard will take a sequence as input and replace all elements with indeces specified in the Patterns parameter, with the corresponding + element in the sequence in the Replacements parameter. The Patterns seqeuence and the Replacements sequence need to be of the same length. + The Replace shard outputs the resulting modified sequence. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/slice_query.shs b/ai/fine-tuning-v1/general/slice_query.shs new file mode 100644 index 0000000000..31df129e03 --- /dev/null +++ b/ai/fine-tuning-v1/general/slice_query.shs @@ -0,0 +1,31 @@ +{ + prompt: """How do I get a segment from a sequence.""" + + solution: """ + [ 0 1 2 3 4 5] >= sequence + + sequence + Slice(0 3 1) + Log("result") + """ + + explicit: """ + [ 0 1 2 3 4 5] >= sequence + + Get(sequence) + Slice( + From: 0 + To: 3 + Step: 1 + ) + Log(Prefix:"result") + ;; Result will be a seuence [0 1 2] + """ + + explanation: """ + Slice is a Shard that will get a segment from a sequence. It takes from the element indicated in the From parameter to the element + indicated in the To parameter and every X element in between. Where X is specified in the Step parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/sort_query.shs b/ai/fine-tuning-v1/general/sort_query.shs new file mode 100644 index 0000000000..003a184943 --- /dev/null +++ b/ai/fine-tuning-v1/general/sort_query.shs @@ -0,0 +1,33 @@ +{ + prompt: """How do I sort all the values of a sequence in ascending order?""" + + solution: """ + [0 1 2 3 4 5] >= sequence + + Sort ( + sequence + ) + """ + + explicit: """ + [0 1 2 3 4 5] >= sequence + + Sort ( + From: sequence + ;; Join: sequenceB + ;; Desc: false + ;; Key: + + ) + """ + + explanation: """ + Sort is a Shard that will parse through the sequence specified in the From parameter and sort it. + If Desc is set to true the sequence is sorted in descending order, else it's sorted in the ascending order + If another sequence is passed into the Join parameter. The sequence in the Join parameter will mirror the final arrangement + of the sequence passed into the From parameter. For this to work, both sequences need to be of the same length. + + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/sort_query2.shs b/ai/fine-tuning-v1/general/sort_query2.shs new file mode 100644 index 0000000000..72da3f5d17 --- /dev/null +++ b/ai/fine-tuning-v1/general/sort_query2.shs @@ -0,0 +1,34 @@ +{ + prompt: """How do I sort all the values of a sequence in descending order?""" + + solution: """ + [0 1 2 3 4 5] >= sequence + + Sort ( + sequence + Desc: true + ) + """ + + explicit: """ + [0 1 2 3 4 5] >= sequence + + Sort ( + From: sequence + ;; Join: sequenceB + Desc: true + ;; Key: + + ) + """ + + explanation: """ + Sort is a Shard that will parse through the sequence specified in the From parameter and sort it. + If :Desc is set to true the sequence is sorted in descending order, else it's sorted in the ascending order + If another sequence is passed into the Join parameter. The sequence in the Join parameter will mirror the final arrangement + of the sequence passed into the From parameter. For this to work, both sequences need to be of the same length. + + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/sub_query.shs b/ai/fine-tuning-v1/general/sub_query.shs new file mode 100644 index 0000000000..d8f077efff --- /dev/null +++ b/ai/fine-tuning-v1/general/sub_query.shs @@ -0,0 +1,31 @@ +{ + prompt: """How do I execute a combination of Shards without consuming the input.""" + + solution: """ + 2 >= values + + Sub({ + Math.Multiply(2) + Log("result1:") + }) + Log("result2:") + """ + + explicit: """ + 2 | Set(Name:values) + + Sub(Shards:{ + Math.Multiply(Operand:2) + Log(Prefix:"result1:") + }) + Log(Prefix:"result2:") + """ + + explanation: """ + Sub is a Shard that activates a Shard or a sequence of Shards independently, without consuming the input. + I.e. the input of the Sub flow will also be its output regardless of the Shards activated in this Sub flow. + + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/swap_query.shs b/ai/fine-tuning-v1/general/swap_query.shs new file mode 100644 index 0000000000..74570d6cee --- /dev/null +++ b/ai/fine-tuning-v1/general/swap_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I swap the values of two variables.""" + + solution: """ + 2 >= variableA + 4 >= variableB + + Swap( + variableA + variableB + ) + """ + + explicit: """ + 2 | Set(Name:variableA) + 4 | Set(Name:variableB) + + Swap( + NameA:variableA + NameB:variableB + ) + """ + + explanation: """ + The Swap Shard swaps the values of the two variables passed to it via :NameA and :NameB parameters. This Shard can only swap the values + of two variables with the same type. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/take_query.shs b/ai/fine-tuning-v1/general/take_query.shs new file mode 100644 index 0000000000..b1bd4bfdcf --- /dev/null +++ b/ai/fine-tuning-v1/general/take_query.shs @@ -0,0 +1,27 @@ +{ + prompt: """How do I get an element of a specific index in a sequence?""" + + solution: """ + [0 1 2 3 4] = sequence + + sequence + Take() ;; Replace 0 accordingly with the desired index + """ + + explicit: """ + [0 1 2 3 4] = sequence + + + Get(sequence) + Take([0]) ;; Replace 0 accordingly with the desired index + """ + + explanation: """ + Take will get and return the specific element from the sequence passed in as input. The element it gets is of the index specified in its parameter. A + sequence of indices can also be specified in its parameter. If a sequence of indices is specified, Take will return a sequence of elements. These elements are + derived from the sequence passed in as input and are of the indeces specified in the sequence of indices. In the scenario provided under solution, Take will return + the 0th element from the sequence. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/take_query2.shs b/ai/fine-tuning-v1/general/take_query2.shs new file mode 100644 index 0000000000..073ceb18e3 --- /dev/null +++ b/ai/fine-tuning-v1/general/take_query2.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I get an element of a specific key in a table.""" + + solution: """ + {k0: 0 k1: 1 k2: 2 k3: 3 k4: 4} = sequence + + sequence + Take("k0") ;; Replace 0 accordingly with the desired index + """ + + explicit: """ + {k0: 0 k1: 1 k2: 2 k3: 3 k4: 4} = sequence + + sequence + Take("k0") ;; Replace 0 accordingly with the desired index + """ + + explanation: """ + Take will get and return the specific element from the specified key from the table passed in as input. Take can also be used to return a specific element from + a sequence or return an array of elements from a sequence. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/toJson_query.shs b/ai/fine-tuning-v1/general/toJson_query.shs new file mode 100644 index 0000000000..4627c0b16e --- /dev/null +++ b/ai/fine-tuning-v1/general/toJson_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert something to JSON format""" + + solution: """ + table-of-values + ToJSON + """ + + explicit: """ + table-of-values + ToJSON(Pure: true Indent:0) + """ + + explanation: """ + ToJSON is a shard that will convert any data type and output a string in the JSON format. The Pure parameter is set true or false, + depending if the input string is generic pure json rather then shards flavored json. The Indent parameter + dictates how many spaces to use as json prettify indent. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/update_query.shs b/ai/fine-tuning-v1/general/update_query.shs new file mode 100644 index 0000000000..4bec2384a8 --- /dev/null +++ b/ai/fine-tuning-v1/general/update_query.shs @@ -0,0 +1,18 @@ +{ + prompt: """How do I update a variable?""" + + solution: """ + 5 > variable-to-update + """ + + explicit: """ + 5 | Update(Name:variable-to-update) + """ + + explanation: """ + Update modifies the value of an existing mutable variable. Do note that update cannot be used to modify the value of a single element in a sequence, it can + only be used to replace the whole sequence. To update a single element in a sequence, use Assoc instead. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/update_query2.shs b/ai/fine-tuning-v1/general/update_query2.shs new file mode 100644 index 0000000000..b76d2d1a47 --- /dev/null +++ b/ai/fine-tuning-v1/general/update_query2.shs @@ -0,0 +1,18 @@ +{ + prompt: """How do I update a key in a table""" + + solution: """ + 5 | Update(variable-to-update "key1") + """ + + explicit: """ + 5 | Update(Name:variable-to-update Key: "key1") + """ + + explanation: """ + For an existing table, Update can only change the existing keys' values. + It cannot add new key-value pairs to the table (do that with Set). To update existing key-values in a table you need to pass the key in the :Key parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/wait_query.shs b/ai/fine-tuning-v1/general/wait_query.shs new file mode 100644 index 0000000000..f4592bc7a8 --- /dev/null +++ b/ai/fine-tuning-v1/general/wait_query.shs @@ -0,0 +1,31 @@ +{ + prompt: """How do I wait for another wire to finish executing before resuming the current wire?""" + + solution: """ + Detach(myWire) + Wait( + ;Wire: + "myWire" + ;Passthrough: + false + ;Timeout: + ) + """ + + explicit: """ + Detach(myWire) + Wait( + Wire: "myWire" + Passthrough: false + ;Timeout: + ) + """ + + explanation: """ + The Wait Shard waits for another wire to complete before resuming execution of the current wire. The Passthrough parameter ensures whether the input of the Shard is passed + as the output. The Timeout parameter, is the amount of time in seconds to wait for the wire to complete, if the time elapses the wire will be stopped and + the flow will fail with a timeout error. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/whenNot_query.shs b/ai/fine-tuning-v1/general/whenNot_query.shs new file mode 100644 index 0000000000..7e82148b93 --- /dev/null +++ b/ai/fine-tuning-v1/general/whenNot_query.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I create a conditional to do soomething when the condition is not met.""" + + solution: """ + variable1 + WhenNot(Is(true) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + WhenNot(Predicate:Is(Value: true) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The WhenNot Shard is a Shard to create a conditional statement. If the conditions stated in the Predicate parameter are not met, it will execute what is stated + in the Action parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/general/when_query.shs b/ai/fine-tuning-v1/general/when_query.shs new file mode 100644 index 0000000000..fbf40fe919 --- /dev/null +++ b/ai/fine-tuning-v1/general/when_query.shs @@ -0,0 +1,24 @@ +{ + prompt: """How do I create a conditional statement to do something when the condition is met.""" + + solution: """ + variable1 + When(Is(true) { + Pass ;Do Something + }) + """ + + explicit: """ + Get(variable1) + When(Predicate:Is(Value: true) Action:{ + Pass ;Do Something + }) + """ + + explanation: """ + The When Shard is a Shard to create a conditional statement. If the conditions stated in the Predicate parameter are met, it will execute what is stated + in the Action parameter. + """ + + tag: " #General" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math.rotation_query.shs b/ai/fine-tuning-v1/math/math.rotation_query.shs new file mode 100644 index 0000000000..c051cc6bec --- /dev/null +++ b/ai/fine-tuning-v1/math/math.rotation_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I calculate the Mean of a sequence""" + + solution: """ + [1.0 2.0 3.0 4.0 5.0 6.0] + Math.Mean + Log("result") + """ + + explicit: """ + [1.0 2.0 3.0 4.0 5.0 6.0] + Math.Mean + Log("result") + """ + + explanation: """ + Math.Mean is a Maths Shard that will calculate the Mean of a floating point sequence. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_MatMul_query.shs b/ai/fine-tuning-v1/math/math_MatMul_query.shs new file mode 100644 index 0000000000..57d2c8d5d8 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_MatMul_query.shs @@ -0,0 +1,18 @@ +{ + prompt: """How do I do matrix multiplication.""" + + solution: """ + tsl-mat | Math.MatMul(rot-mat) | Math.MatMul(scl-mat) = transform-matrix + """ + + explicit: """ + tsl-mat | Math.MatMul(Operand:rot-mat) | Math.MatMul(Operand:scl-mat) = transform-matrix + """ + + explanation: """ + Math.Rotation is a Maths Shard that does matrix multiplication on the input matrix and the matrix provided in the operand parameter. It can be used + for example to generate the transformation matrix of an object from its translation, rotation and scale matrices. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_abs_query.shs b/ai/fine-tuning-v1/math/math_abs_query.shs new file mode 100644 index 0000000000..4f57e5656d --- /dev/null +++ b/ai/fine-tuning-v1/math/math_abs_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I get the absolute value of a signed variable?""" + + solution: """ + -3 + Math.Abs + Log("reseult") ;; result will be 3 + """ + + explicit: """ + -3 + Math.Abs + Log("reseult") ;; result will be 3 + """ + + explanation: """ + Math.Abs is a Maths Shard which takes in a signed numeric value as input and return its absolute value. If a sequence is given as input, + Math.Abs will parse through the sequence and return a sequence of absolute values. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_add_query.shs b/ai/fine-tuning-v1/math/math_add_query.shs new file mode 100644 index 0000000000..027f0f7584 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_add_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I add two values together?""" + + solution: """ + 3 | Math.Add(2) + Log("Result") ;; the result will be 5 + """ + + explicit: """ + 3 | Math.Add(Operand:2) + Log(Prefix:"Result") ;; the result will be 5 + """ + + explanation: """ + Math.Add is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the addition + mathmatical operation. Math.Add can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario + it will add the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function. + Unlike Math.Inc which is a unary operation, Math.Add is a binary operation. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_cos_query.shs b/ai/fine-tuning-v1/math/math_cos_query.shs new file mode 100644 index 0000000000..175583a09d --- /dev/null +++ b/ai/fine-tuning-v1/math/math_cos_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I apply the cosine trigonometric function to a value""" + + solution: """ + 3.1415927 + Math.Cos + Log("result") + """ + + explicit: """ + 3.1415927 + Math.Cos + Log(Prefix:"result") + """ + + explanation: """ + Math.Cos is a Maths Shard that will apply the cosine trigonometric function to the float value passed in as input. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_dec_query.shs b/ai/fine-tuning-v1/math/math_dec_query.shs new file mode 100644 index 0000000000..e44ba3560e --- /dev/null +++ b/ai/fine-tuning-v1/math/math_dec_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I decrease the value of a mutable variable?""" + + solution: """ + 10 >= mutable-var + + 1 + Math.Dec(mutable-var) + + mutable-var + Log("result") + """ + + explicit: """ + 10 | Set(Name: mutable-var) + + 1 + Math.Dec(Value: mutable-var) + + Get(mutable-var) + Log("result") + """ + + explanation: """ + Math.Dec is a Maths Shard that will take a in inputs with numeric value and decrease the mutable variable passed into Value parameter by said amount. + Unlike Math.Subtract which is a binary operation, Math. Dec is a unary operation. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_degreestoradians_query.shs b/ai/fine-tuning-v1/math/math_degreestoradians_query.shs new file mode 100644 index 0000000000..9aaa4162aa --- /dev/null +++ b/ai/fine-tuning-v1/math/math_degreestoradians_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert degrees to radians?""" + + solution: """ + 90.0 + Math.DegreesToRadians + Log("result") + """ + + explicit: """ + 90.0 + Math.DegreesToRadians + Log("result") + """ + + explanation: """ + Math.DegreesToRadians takes in an angle as degrees and converts it into radians. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_divide_query.shs b/ai/fine-tuning-v1/math/math_divide_query.shs new file mode 100644 index 0000000000..7a95a627c2 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_divide_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I divide two values together?""" + + solution: """ + @wire(wire{ + 6.0 | Math.Divide(2.0) + Log("Result") ;; the result will be 3.0 + }) + """ + + explicit: """ + 6.0 | Math.Divide(Operand:2.0) + Log(Prefix:"Result") ;; the result will be 3.0 + """ + + explanation: """ + Math.Divide is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the division + mathmatical operation. Math.Divide can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario + it will divide the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_floor_query.shs b/ai/fine-tuning-v1/math/math_floor_query.shs new file mode 100644 index 0000000000..f05fee95ff --- /dev/null +++ b/ai/fine-tuning-v1/math/math_floor_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I round down a float to the lowest integer.""" + + solution: """ + 2.7 + Math.Floor + Log("result") ;; result will be 2 + """ + + explicit: """ + 2.7 + Math.Floor + Log("result") ;; result will be 2 + """ + + explanation: """ + Math.Floor is a Maths Shard that takes a float or a sequence of floats and rounds it down to the nearest integer. Unlike Math.Round which will + round a floating-point number to the nearest integer, Math.Floor will round a floating-point number down to the nearest integer that is less than + or equal to it. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_inc_query.shs b/ai/fine-tuning-v1/math/math_inc_query.shs new file mode 100644 index 0000000000..99b5da888f --- /dev/null +++ b/ai/fine-tuning-v1/math/math_inc_query.shs @@ -0,0 +1,30 @@ +{ + prompt: """How do I increase the value of a mutable variable?""" + + solution: """ + 0 >= mutable-var + + 1 + Math.inc(mutable-var) + + mutable-var + Log("result") + """ + + explicit: """ + 0 | Set(Name: mutable-var) + + 1 + Math.inc(Value: mutable-var) + + Get(mutable-var) + Log("result") + """ + + explanation: """ + Math.Inc is a Maths Shard that will take a in inputs with numeric value and increase the mutable variable passed into Value parameter by said amount. + Unlike Math.Add which is a binary operation, Math. Inc is a unary operation. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_length_query.shs b/ai/fine-tuning-v1/math/math_length_query.shs new file mode 100644 index 0000000000..2a4978e5ce --- /dev/null +++ b/ai/fine-tuning-v1/math/math_length_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I calculate the magnitude or length of a vector?""" + + solution: """ + @f2(2.0 3.0) + Math.Length + Log("result") ;; result will be 3.60555 + """ + + explicit: """ + @f2(2.0 3.0) + Math.Length + Log(PRefix: "result") ;; result will be 3.60555 + """ + + explanation: """ + The Math.Length Shard is a Maths Shard that takes a vector as input and returns the vector's magnitude/length calculated using Pythagorean theorem. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_length_squared_query.shs b/ai/fine-tuning-v1/math/math_length_squared_query.shs new file mode 100644 index 0000000000..2873e9525e --- /dev/null +++ b/ai/fine-tuning-v1/math/math_length_squared_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I get the swuared length/magnitude of a vector""" + + solution: """ + @f2(2.0 3.0) + Math.Length + Log("result") ;; result will be 13 + """ + + explicit: """ + @f2(2.0 3.0) + Math.Length + Log(PRefix: "result") ;; result will be 13 + """ + + explanation: """ + The Math.LengthSquared Shard is a Maths Shard that takes a vector as input and returns the vector's squared magnitude/length calculated using Pythagorean theorem. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_lerp_query.shs b/ai/fine-tuning-v1/math/math_lerp_query.shs new file mode 100644 index 0000000000..6e9ca83f0e --- /dev/null +++ b/ai/fine-tuning-v1/math/math_lerp_query.shs @@ -0,0 +1,32 @@ +{ + prompt: """How do I linearly interpolate between two values.""" + + solution: """ + 0 = x + + 0.01 ;; interpolation factor + Math.Lerp(x 100) + > x + + x + Log("value") + """ + + explicit: """ + 0 = x + + 0.01 ;; interpolation factor + Math.Lerp(First:x Second:100) + > x + + x + Log(Prefix:"value") + """ + + explanation: """ + Math.Lerp is a Maths Shard which takes the interpolation factor as input and will lineraly interpolate between the the value in the First parameter to + the value in the Second Paramter. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_log_query.shs b/ai/fine-tuning-v1/math/math_log_query.shs new file mode 100644 index 0000000000..d347445918 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_log_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I get the natural logarithm of a number?""" + + solution: """ + 7.38906 + Math.Log + Log("result") ;; result is 2 + """ + + explicit: """ + 7.38906 + Math.Log + Log(Prefix:"result") ;; result is 2 + """ + + explanation: """ + The Math.Log Shard is a Maths Shard that will take a floating point value and return that value's natrual logarithm to the base of e. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_mean_query.shs b/ai/fine-tuning-v1/math/math_mean_query.shs new file mode 100644 index 0000000000..c051cc6bec --- /dev/null +++ b/ai/fine-tuning-v1/math/math_mean_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I calculate the Mean of a sequence""" + + solution: """ + [1.0 2.0 3.0 4.0 5.0 6.0] + Math.Mean + Log("result") + """ + + explicit: """ + [1.0 2.0 3.0 4.0 5.0 6.0] + Math.Mean + Log("result") + """ + + explanation: """ + Math.Mean is a Maths Shard that will calculate the Mean of a floating point sequence. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_multiply_query.shs b/ai/fine-tuning-v1/math/math_multiply_query.shs new file mode 100644 index 0000000000..ddc6ed2679 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_multiply_query.shs @@ -0,0 +1,23 @@ +{ + prompt: """How do I multiply two values together?""" + + solution: """ + @wire(wire{ + 3 | Math.Multiply(2) + Log("Result") ;; the result will be 6 + }) + """ + + explicit: """ + 3 | Math.Multiply(Operand:2) + Log(Prefix:"Result") ;; the result will be 6 + """ + + explanation: """ + Math.Multiply is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the multiply + mathmatical operation. Math.Multiply can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario + it will Multiply the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_radianstodegrees_query.shs b/ai/fine-tuning-v1/math/math_radianstodegrees_query.shs new file mode 100644 index 0000000000..86362a00e5 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_radianstodegrees_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I convert radians to degrees?""" + + solution: """ + 1.5708 + Math.DegreesToRadians + Log("result") + """ + + explicit: """ + 1.5708 + Math.DegreesToRadians + Log("result") + """ + + explanation: """ + Math.RadiansToDegrees takes in an angle as radians and converts it into degrees. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_rotation_query.shs b/ai/fine-tuning-v1/math/math_rotation_query.shs new file mode 100644 index 0000000000..d440e4d0a8 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_rotation_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I create a rotation matrix""" + + solution: """ + @f4(1.0 1.0 1.0 0.0) + Math.Rotation + Log("result") + """ + + explicit: """ + @f4(1.0 1.0 1.0 0.0) + Math.Rotation + Log("result") + """ + + explanation: """ + Math.Rotation is a Maths Shard that takes a float4 input which represents the object's quaternion rotation and converts it into + a rotation matrix. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_round_query.shs b/ai/fine-tuning-v1/math/math_round_query.shs new file mode 100644 index 0000000000..e7a87fe53e --- /dev/null +++ b/ai/fine-tuning-v1/math/math_round_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I round a float to the nearest integer?""" + + solution: """ + 3.6 + Math.Round + Log("Result") ;; the result will be 4 + """ + + explicit: """ + 3.6 + Math.Round + Log("Result") ;; the result will be 4 + """ + + explanation: """ + Math.Round is a Maths Shard which will take a float or a sequence of float and round the values to the nearest integer. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_scaling_query.shs b/ai/fine-tuning-v1/math/math_scaling_query.shs new file mode 100644 index 0000000000..9707eeaddc --- /dev/null +++ b/ai/fine-tuning-v1/math/math_scaling_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I create a scale matrix""" + + solution: """ + @f3(1.0 1.0 1.0) + Math.Scaling + Log("result") + """ + + explicit: """ + @f3(1.0 1.0 1.0) + Math.Scaling + Log("result") + """ + + explanation: """ + Math.Scaling is a Maths Shard that takes a float3 as input and converts it into a scale matrix. + The first value in the float 3 represents the x scale, the second value the y scale and the third value the z scale. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_sine_query.shs b/ai/fine-tuning-v1/math/math_sine_query.shs new file mode 100644 index 0000000000..50edf61e51 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_sine_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I apply the sine trigonometric function to a value""" + + solution: """ + 1.5708 + Math.Sin + Log("result") + """ + + explicit: """ + 1.5708 + Math.Sin + Log(Prefix:"result") + """ + + explanation: """ + Math.Sin is a Maths Shard that will apply the sine trigonometric function to the float value passed in as input. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_sqrt_query.shs b/ai/fine-tuning-v1/math/math_sqrt_query.shs new file mode 100644 index 0000000000..a9fc88ce96 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_sqrt_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I get the square root of a number""" + + solution: """ + 4.0 + Math.Sqrt + Log("result") ;; result is 2.0 + """ + + explicit: """ + 4.0 + Math.Log + Log(Prefix:"result") ;; result is 2.0 + """ + + explanation: """ + The Math.Sqrt Shard is a Maths Shard that takes a floating point value or a sequence of floating point values and returns theri square root. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_subtract_query.shs b/ai/fine-tuning-v1/math/math_subtract_query.shs new file mode 100644 index 0000000000..2b54f44eb7 --- /dev/null +++ b/ai/fine-tuning-v1/math/math_subtract_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I subtract two values together?""" + + solution: """ + 3 | Math.Subtract(2) + Log("Result") ;; the result will be 1 + """ + + explicit: """ + 3 | Math.Subtract(Operand:2) + Log(Prefix:"Result") ;; the result will be 1 + """ + + explanation: """ + Math.Subtract is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the subtract + mathmatical operation. Math.Subtract can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario + it will subtract the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function. + Unlike Math.Dec which is a unary operation, Math.Subtract is a binary. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_tan_query.shs b/ai/fine-tuning-v1/math/math_tan_query.shs new file mode 100644 index 0000000000..90d656d31c --- /dev/null +++ b/ai/fine-tuning-v1/math/math_tan_query.shs @@ -0,0 +1,21 @@ +{ + prompt: """How do I apply the tangent trigonometric function to a value""" + + solution: """ + 0.785398 + Math.Tan + Log("result") + """ + + explicit: """ + 0.785398 + Math.Tan + Log(Prefix:"result") + """ + + explanation: """ + Math.Tan is a Maths Shard that will apply the tanget trigonometric function to the float value passed in as input. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/math/math_translation_query.shs b/ai/fine-tuning-v1/math/math_translation_query.shs new file mode 100644 index 0000000000..abe95637af --- /dev/null +++ b/ai/fine-tuning-v1/math/math_translation_query.shs @@ -0,0 +1,22 @@ +{ + prompt: """How do I create a rotation matrix""" + + solution: """ + @f3(1.0 1.0 1.0) + Math.Translation + Log("result") + """ + + explicit: """ + @f3(1.0 1.0 1.0) + Math.Translation + Log("result") + """ + + explanation: """ + Math.Translation is a Maths Shard that takes a float3 input and converts it into a rotation matrix. + The first value in the float 3 represents the x translation, the second value the y translation and the third value the z translation. + """ + + tag: " #Maths" +} \ No newline at end of file diff --git a/ai/fine-tuning-v1/prepare-data.shs b/ai/fine-tuning-v1/prepare-data.shs deleted file mode 100644 index 1409c260c7..0000000000 --- a/ai/fine-tuning-v1/prepare-data.shs +++ /dev/null @@ -1,21 +0,0 @@ -@define(prompt-type @type({"user": Type::String "assistant": Type::String})) -@define(system-prompt "placeholder") - -@wire(prepare-jsonl { - "" >= jsonl - - ; TODO - ForEach({ - Expect(@prompt-type) = chat - { - "messages": [ - {"role": "system" "content": @system-prompt} - {"role": "user" "content": chat:user} - {"role": "assistant" "content": chat:assistant}] - } | ToJson | AppendTo(jsonl) - ; add new line - "\n" | AppendTo(jsonl) - }) - - "training-set.jsonl" | FS.Write(jsonl) -}) \ No newline at end of file diff --git a/ai/fine-tuning-v1/test.shs b/ai/fine-tuning-v1/test.shs deleted file mode 100644 index 596cce7eff..0000000000 --- a/ai/fine-tuning-v1/test.shs +++ /dev/null @@ -1,19 +0,0 @@ -{ - prompt: """ - How to add a new element to an existing Shards sequence? - """ - - solution: { - element >> sequence - } - - explicit: { - Get(element) | Push(sequence) - } - - explaination: """ - The Push method is used to add a new element to the end of a sequence. - The Get method is used to get an element from a sequence. - Remember, there might be type issues during composition if a sequence is bound to a certain type. - """ -} \ No newline at end of file diff --git a/ai/prepare-data.shs b/ai/prepare-data.shs new file mode 100644 index 0000000000..d156cf38cd --- /dev/null +++ b/ai/prepare-data.shs @@ -0,0 +1,135 @@ +@define(prompt-type @type({"user": Type::String "assistant": Type::String})) +@define(system-prompt "placeholder-system-prompt") + +@wire(prepare-jsonl { + "" >= jsonl + + {user: "user-prompt" assistant: "ai-assistant-answer"} >> temp-prompt-seq + Clear(temp-prompt-seq) + + ; TODO + + "C:/Projects/shards/ai/fine-tuning-v1" + FS.Iterate + + ForEach({ + { + {user: "user-prompt" assistant: "ai-assistant-answer"} >= temp-chat + "" >= ai-assistant-answer + } + + FS.Read + Shards.Read(Json: true) + FromJson (Pure: true) + + ;; Parsing the output table and slowly taking the items that I need + ExpectTable + Take("sequence") + ExpectTable + Take("statements") + ExpectSeq + = temp-seq + Count(temp-seq) + When(Predicate: Is(1) Action:{ + temp-seq + Take(0) + ExpectTable + Take("Pipeline") + ExpectTable + Take("blocks") + ExpectSeq + Take(0) + ExpectTable + Take("content") + ExpectTable + Take("Const") + ExpectTable + Take("Table") + ExpectSeq + ;; It is at this point we take different things. Take(0) for prompt: , Take(1) for solution:, Take(2) for explicit:, Take(3) for explanation:, Take(4) for tag: + {Take(0) ;; Taking and Setting User Prompt + ExpectSeq + Take(1) + ExpectTable + Take("String") + ExpectString + Update(temp-chat "user") + ;temp-chat + ;Log("result") + } + + {Take(1) ;; Taking solution: and appending it to ai-assistant-answer + ExpectSeq + Take(1) + ExpectTable + Take("String") + ExpectString + AppendTo(ai-assistant-answer) + ;ai-assistant-answer + ;Log("answer") + } + + {Take(2) ;; Taking explicit: and appending it to ai-assistant-answer + ExpectSeq + Take(1) + ExpectTable + Take("String") + ToString + ExpectString + AppendTo(ai-assistant-answer) + ; ai-assistant-answer + ; Log("answer") + } + + {Take(3) ;; Taking explanation: and appending it to ai-assistant-answer + ExpectSeq + Take(1) + ExpectTable + Take("String") + ExpectString + AppendTo(ai-assistant-answer) + ; ai-assistant-answer + ; Log("answer") + } + + {Take(4) ;; Taking tag: and appending it to ai-assistant-answer + ExpectSeq + Take(1) + ExpectTable + Take("String") + ExpectString + AppendTo(ai-assistant-answer) + ; ai-assistant-answer + ; Log("answer") + } + + ai-assistant-answer ;; updating temp-chat table's assistant: key with ai-assistant-answer + Update(temp-chat "assistant") + temp-chat >> temp-prompt-seq + + ; temp-prompt-seq + ; Log("answer") + }) + }) + + temp-prompt-seq + ForEach({ + Expect(@prompt-type) = chat + { + "messages": [ + {"role": "system" "content": @system-prompt} + {"role": "user" "content": chat:user} + {"role": "assistant" "content": chat:assistant}] + } | ToJson | AppendTo(jsonl) + ; add new line + "\n" | AppendTo(jsonl) + }) + + "training-set.jsonl" | FS.Write(jsonl) + + +}) + +@mesh(main) +@schedule(main prepare-jsonl) +@run(main) \ No newline at end of file diff --git a/ai/training-set.jsonl b/ai/training-set.jsonl new file mode 100644 index 0000000000..8e00f10cee --- /dev/null +++ b/ai/training-set.jsonl @@ -0,0 +1,164 @@ +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check more than one condition?","role":"user"},{"content":"\r\n variable\r\n When({Is(condition1) | And | variable2 | Is(condition2)} {\r\n Pass ; Do Something\r\n })\r\n Get(variable)\r\n When(Predicate: {Is(condition1) | And | Get(variable2) | Is(condition2)} Action: {\r\n Pass ; Do Something\r\n })\r\n We use When or If Shards to create a conditional statement and do an action when the Predicate parameter returns true. \r\n To chain more conditions to the Predicate we use the And Shard. With conditions chained by the And Shard, the Predicate parameter will only\r\n return true when all conditions are met.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How to add a new element to the end of an existing Shards sequence?","role":"user"},{"content":"element | \r\n AppendTo(sequence) Get(element) | \r\n AppendTo(Collection: sequence)\r\n The AppendTo Shard adds an element that is passed as input to the end of a sequence specified in the Collection parameter.\r\n This Shard works on both string and sequence variables.\r\n The type of element being appended needs to be of the same type as the sequence.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I replace an element of an existing sequence?","role":"user"},{"content":"[index0 variable1 index1 variable2] | Assoc(sequence)[index0 variable1 index1 variable2] \r\n | Assoc(\r\n Name: sequence\r\n ;;Key: key\r\n )\r\n The Assoc Shard is replacing element of index 0 in sequence with variable1 and element with index of 1 in sequence to variable2.\r\n The input sequence for Assoc must always contain an even number of elements. \r\n The elements of the input sequence are parsed in pairs. \r\n The 1st element of each pair gives the index of the target element to update, and the 2nd element of that pair gives the new value for the target element.\r\n Assoc can also be used to update a specific key in a table.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert bytes to String?","role":"user"},{"content":"\r\n bytes\r\n BytesToString\r\n \r\n bytes\r\n BytesToString\r\n \r\n BytesToString is a Shard that takes in an input of type Bytes and converts it to type String.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do i delete all the elements in a sequence.","role":"user"},{"content":"Clear(sequence)Clear(Name: sequence)\r\n Clear removes all the elements of the sequence that has been passed to it in the Name: parameter.\r\n This Shard works on both sequences and tables. \r\n Use the Key: parameter to delete all elements of the specified key in a table.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create an unassigned constant in Shards.","role":"user"},{"content":"Const(5) ;;Change the value accordinglyConst(Value: 5) ;;Change the value accordingly\r\n Const declares a constant value (of any data type) by passing it into the Value parameter.\r\n A constant value declared with Const is un-named i.e., it is not assigned to any variable or allocated any alias.\r\n In this scenario a constant value of 5 is declared and can be used as an input for other Shards.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get the total number of elements in a sequence?","role":"user"},{"content":"\r\n Count(sequence-to-count)\r\n \r\n Count(\r\n Name: sequence-to-Count\r\n ;; Key: key\r\n )\r\n \r\n Count parses the variable passed to it in the Name parameter, and returns the count of characters, elements, or key-value pairs depending on \r\n whether the data type passed to it was a string, a sequence, or a table. Parameter Key applies only to tables.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I count the total number of key and value pairs that a table has ?","role":"user"},{"content":"\r\n Count(table-to-count)\r\n \r\n Count\r\n (\r\n Name: table-to-count\r\n ;;Key: key-to-count\r\n )\r\n \r\n Count parses the value passed to it in the :Name parameter, and returns the count of characters, elements, or key-value pairs depending on whether the data type passed to it was a string, a sequence, or a table.\r\n This Shard works on both sequences and tables. Parameter :Key applies only to tables.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I count the total number of elements in a sequence of a key from a table","role":"user"},{"content":"\r\n Count(table-to-count key-to-count)\r\n \r\n Count(Name: table-to-count Key: key-to-count)\r\n \r\n Count parses the value passed to it in the :Name parameter, and returns the count of characters, elements, or key-value pairs depending on whether the data type passed to it was a string, a sequence, or a table.\r\n This Shard works on both sequences and tables. Parameter :Key applies only to tables.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I remove the first element in the sequence and return the remaining sequence?","role":"user"},{"content":"\r\n DropFront(sequence-to-drop)\r\n Log(\"Remaining Sequence\")\r\n \r\n DropFront(Name: sequence-to-drop)\r\n Log(Prefix: \"Remaining Sequence\")\r\n \r\n DropFront removes the first element of the sequence variable that has been passed to in the Name parameter. Unlike the PopFront Shard, DropFront will return the remaining\r\n sequence as output.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I remove the last element in the sequence and return the remaining sequence?","role":"user"},{"content":"\r\n Drop(sequence-to-drop)\r\n Log(\"Remaining Sequence\")\r\n \r\n Drop(Name: sequence-to-drop)\r\n Log(Prefix: \"Remaining Sequence\")\r\n \r\n Drop removes the last element of the sequence variable that has been passed to in the :Name parameter. Unlike the Pop Shard which will return \r\n the popped element, Drop will return the remaining sequence as output.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I delete an element in a sequence. ","role":"user"},{"content":"\r\n Erase([index-to-delete] sequence-to-delete-from)\r\n \r\n Erase(Indices:[index-to-delete] Name:sequence-to-delete-from)\r\n \r\n Erase deletes single or multiple elements (from sequences) and key-value pairs (from tables).\r\n For a sequence, this Shard expects the index (or a sequence of indices in descending order) of the element(s) to be erased, followed by the \r\n name of the sequence variable in the Name parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I delete multiple elements in a sequence.","role":"user"},{"content":"\r\n Erase([index-to-delete1 index-to-delete2 index-to-delete3] sequence-to-delete-from)\r\n \r\n Erase(Indices:[index-to-delete1 index-to-delete2 index-to-delete3] Name:sequence-to-delete-from)\r\n \r\n Erase deletes single or multiple elements (from sequences) and key-value pairs (from tables).\r\n For a sequence, this Shard expects the index (or a sequence of indices in descending order) of the element(s) to be erased, followed by the name of the sequence variable in the Name parameter.\r\n To delete more elements, add the more Indeces to the sequence in the Indeces parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I delete keys from a table","role":"user"},{"content":"\r\n Erase([\"key1\" \"key2\"] sequence-to-delete-from)\r\n \r\n Erase(Indices:[\"key1\" \"key2\"] Name:sequence-to-delete-from)\r\n \r\n Erase deletes single or multiple elements (from sequences) and key-value pairs (from tables).\r\n For a sequence, this Shard expects the index (or a sequence of indices in descending order) of the element(s) to be erased, followed by the name of the sequence variable in the Name parameter.\r\n To delete more keys, add the more keys to the sequence in the Keys parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I exit the program through code?","role":"user"},{"content":"\r\n 0;; Error Code\r\n Exit\r\n \r\n 0;; Error Code\r\n Exit\r\n \r\n Exit is a Shard that will automatically close the program. It takes in a integer as input. \r\n This integer is usually to denote the error code.\r\n If there is no error code to be used as input use 0.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I ensure that the output of a Shard is a specific type?","role":"user"},{"content":"\r\n output-to-check ;; use any of the Shards below to check the required type\r\n Expect(@type (Type::None))\r\n Expect(@type(Type::Any))\r\n Expect(@type(Type::Bool))\r\n Expect(@type(Type::Int))\r\n Expect(@type(Type::Int2))\r\n Expect(@type(Type::Int3))\r\n Expect(@type(Type::Int4))\r\n Expect(@type(Type::Int8))\r\n Expect(@type(Type::Int16))\r\n Expect(@type(Type::Float))\r\n Expect(@type(Type::Float2))\r\n Expect(@type(Type::Float3))\r\n Expect(@type(Type::Float4))\r\n Expect(@type(Type::Color))\r\n Expect(@type(Type::Wire))\r\n Expect(@type(Type::Shard))\r\n Expect(@type(Type::Bytes))\r\n Expect(@type(Type::String))\r\n Expect(@type(Type::Image))\r\n Expect(@type(Type::Audio))\r\n \r\n output-to-check ;; use any of the Shards below to check the required type\r\n Expect(Type:@type(Type::None))\r\n Expect(Type:@type(Type::Any))\r\n Expect(Type:@type(Type::Bool))\r\n Expect(Type:@type(Type::Int))\r\n Expect(Type:@type(Type::Int2))\r\n Expect(Type:@type(Type::Int3))\r\n Expect(Type:@type(Type::Int4))\r\n Expect(Type:@type(Type::Int8))\r\n Expect(Type:@type(Type::Int16))\r\n Expect(Type:@type(Type::Float))\r\n Expect(Type:@type(Type::Float2))\r\n Expect(Type:@type(Type::Float3))\r\n Expect(Type:@type(Type::Float4))\r\n Expect(Type:@type(Type::Color))\r\n Expect(Type:@type(Type::Wire))\r\n Expect(Type:@type(Type::Shard))\r\n Expect(Type:@type(Type::Bytes))\r\n Expect(Type:@type(Type::String))\r\n Expect(Type:@type(Type::Image))\r\n Expect(Type:@type(Type::Audio))\r\n \r\n The expect Shard will take an input and check if it is the stipulated type in the Type parameter.If it is, it will return the input as the stipulated type.\r\n Otherwise, the program will fail.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I do an action for each element in a sequence?","role":"user"},{"content":"\r\n [element1 element2 element3]\r\n | ForEach({\r\n Math.Add(1)\r\n })\r\n \r\n [element1 element2 element3]\r\n | ForEach(Apply:{\r\n Math.Add(1)\r\n })\r\n \r\n For each, processes every element or key-value pair of a sequence/table with a given Shard or sequence of Shards. In the example provided in the solution,\r\n we will add 1 to element1 then element2 and element3. The ForEach Shard will return its input as its output.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I do something cumalatively for a specififed range. ","role":"user"},{"content":"\r\n 0 >= forRange-each-cycle-value\r\n \r\n ForRange\r\n (\r\n 1\r\n 5\r\n {\r\n = added-value\r\n\r\n forRange-each-cycle-value\r\n Math.Add(added-value)\r\n > forRange-each-cycle-value\r\n\r\n Log(\"added-value\")\r\n }\r\n )\r\n \r\n 0 >= forRange-each-cycle-value\r\n \r\n ForRange\r\n (\r\n From:1\r\n To:5\r\n Action:{\r\n = added-value\r\n\r\n forRange-each-cycle-value\r\n Math.Add(added-value)\r\n > forRange-each-cycle-value\r\n\r\n Log(\"added-value\")\r\n }\r\n )\r\n \r\n The ForRange Shard iterates over a range of numbers, feeding each number into the Action parameter and executes the process stated in the Action parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert Base58 to bytes?","role":"user"},{"content":"\r\n bytes\r\n FromBase58\r\n \r\n bytes\r\n FromBase58\r\n \r\n FromBase58 is a Shard that takes in a base58 string as input and outputs the corresponding bytes.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert Base64 to bytes?","role":"user"},{"content":"\r\n bytes\r\n FromBase64\r\n \r\n bytes\r\n FromBase64\r\n \r\n FromBase64 is a Shard that takes in a base64 string as input and outputs the corresponding bytes.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I read the value of a variable.","role":"user"},{"content":"\"value\" = variable\r\n\r\n Get(variable)\r\n Log(\"Variable read\")\"value\" = variable\r\n\r\n Get(Name: variable)\r\n Log(Prefix: \"Variable read\")\r\n Get is used to read the value of an existing variable. All variables that can be created by Set, can be read by Get.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I read a value of a key from a table.","role":"user"},{"content":"{k1: 1 k2: 2 k3: 3} = table\r\n\r\n Get(table k1 0)\r\n Log(\"Key read\")None\r\n Get can be used to read the value of a Key from a table. While the Take Shard can also be used, there is a difference between the two. The difference being, if Get\r\n is trying to read a key that does not exist and no default value is provided, it will throw and error. Take on the otherhand will return none. Unlike Take, Get\r\n can also place a default value through its Default parameter for a key that does not exist yet.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get the highest value from a sequence","role":"user"},{"content":"[1 2 3 4 5] = seq\r\n Highest\r\n Log(\"resulting\")[1 2 3 4 5] = seq\r\n Highest\r\n Log(Prefix:\"resulting\")\r\n The Highest shard will parse a sequence and return the element with the highest \"value\". If it is a sequence of integers or floats it will return the element with\r\n the highest integer or float. If it is a sequence of strings it will return the element with the highest value based on the lexicographical order.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a conditional statement that will do something when the condition is met and something else when it is not.","role":"user"},{"content":"\r\n variable1\r\n If(Is(true) {\r\n Pass ;Do Something\r\n } {\r\n Pass ; Else do something else\r\n })\r\n \r\n Get(variable1)\r\n If(Predicate:Is(Value: true) Then:{\r\n Pass ;Do Something\r\n } Else:{\r\n Pass ;Do Something else\r\n })\r\n \r\n The If Shard is a Shard used to create a conditional statement. If the conditions stated in the Predicate parameter is met, it will execute what is stated in\r\n the Then paramater. If the condition is not met, it will execute what is listed in the Else parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I find the index number of a specific element in a sequence?","role":"user"},{"content":"\r\n sequence\r\n |IndexOf(item-to-find)\r\n > index-of-item\r\n \r\n Get(Name:sequence)\r\n IndexOf(Item: item-to-find)\r\n Update(Name: index-of-item)\r\n \r\n Index of will take a sequence as an input and search through the sequence until it finds an exact match of the item stated in the Item parameter. Once a match\r\n has been found, it will return the index of the matched item.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if every value in a sequence is less or equal to a certain value.","role":"user"},{"content":"\r\n [1 2 3 4 5 6 7] = sequence\r\n\r\n sequence\r\n If(IsAllLessEqual(7) {Msg(\"all matches\")} {Msg(\"not all matches\")})\r\n \r\n [1 2 3 4 5 6 7] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAllLessEqual(Value: 7) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAllLessEqual Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through\r\n a sequence and check if every element is lesser than the value stated in the Value parameter. If all elements are of lower or equal value, it will return true,\r\n otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. \r\n The value placed in the Value parameter must be of the same data type as the input.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if every value in a sequence is less than a certain value.","role":"user"},{"content":"\r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(IsAllLess(7) {Msg(\"all matches\")} {Msg(\"not all matches\")})\r\n \r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAllLess(Value: 7) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAllLess Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through\r\n a sequence and check if every element is lesser than the value stated in the Value parameter. If all elements are of lower value, it will return true,\r\n otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. \r\n The value placed in the Value parameter must be of the same data type as the input.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if every value in a sequence is more or equal to a certain value.","role":"user"},{"content":"\r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(IsAllMoreEqual(1) {Msg(\"all matches\")} {Msg(\"not all matches\")})\r\n \r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAllMoreEqual(Value: 1) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAllMoreEqual Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through\r\n a sequence and check if every element is more or equal to the value stated in the Value parameter. If all elements are of higher or equal value, it will return true,\r\n otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. \r\n The value placed in the Value parameter must be of the same data type as the input.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if every value in a sequence is more than a certain value.","role":"user"},{"content":"\r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(IsAllMore(0) {Msg(\"all matches\")} {Msg(\"not all matches\")})\r\n \r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAllMore(Value: 0) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAllMore Shard is a Shard that can be used in the Predicate parameter of conditional Shards such as If and When. It will parse through\r\n a sequence and check if every element is more than the value stated in the Value parameter. If all elements are of higher value, it will return true,\r\n otherwise, it will return false. If comparing String datatypes, the Shard will compare values based on Lexicographical Order. \r\n The value placed in the Value parameter must be of the same data type as the input.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if every value in a sequence does not equal somthing","role":"user"},{"content":"\r\n [2 2 2 2 2 2 2] = sequence\r\n\r\n sequence\r\n If(IsAllNot(3) {Msg(\"all matches\")} {Msg(\"not all matches\")})\r\n \r\n [2 2 2 2 2 2 2] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAllNot(Value: 3) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAllNot Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. It will parse through\r\n a sequence and check if every element does not match the value stated in the Value parameter. If all elements does not match, it will return true,\r\n otherwise, it will return false.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if every value in a sequence equals something.","role":"user"},{"content":"\r\n [2 2 2 2 2 2 2] = sequence\r\n\r\n sequence\r\n If(IsAll(2) {Msg(\"all matches\")} {Msg(\"not all matches\")})\r\n \r\n [2 2 2 2 2 2 2] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAll(Value: 2) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAll Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. It will parse through\r\n a sequence and check if every element matches the value stated in the Value parameter. If all elements matches, it will return true,\r\n otherwise, it will return false.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is Almost a certain value ","role":"user"},{"content":"\r\n 0 >= value\r\n\r\n value | Math.Add(1) > value\r\n\r\n value\r\n If(IsAlmost(10 1) {Msg(\"almost 10!\")} {Msg(\"not there yet!\")})\r\n \r\n 0 >= value\r\n\r\n value | Math.Add(1) > value\r\n\r\n Get(value)\r\n If(Predicate: IsAlmost(Value: 10 Treshold:1) Then:{\r\n Msg(\"all matches\")\r\n } Else: {\r\n Msg(\"not all matches\")}\r\n )\r\n \r\n The IsAlmost Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When.\r\n It will check if the input is near to the value stated in the Value parameter besed on the Treshold parameter. If the input\r\n value is nearing the value provided in the Value parameter, the Shard will return true, otherwise, it will return false.\r\n The input can be of any number type or a sequence of such types. If the Shard is comparing between two numeric sequences, it will compare the elements\r\n of the input sequence with the corresponding indexed element in the sequence provided into the the Value parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if any value in a sequence is of lower value or equal to something.","role":"user"},{"content":"\r\n [3 3 3 3 2] = sequence\r\n\r\n sequence\r\n If(IsAnyLessEqual(2) {Msg(\"one match\")} {Msg(\"none match\")})\r\n \r\n [3 3 3 3 2] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAnyLessEqual(Value: 2) Then:{\r\n Msg(\"one match\")\r\n } Else: {\r\n Msg(\"none match\")}\r\n )\r\n \r\n The IsAnyLessEqual is a Shard that can be used in the Predicate parameter of conditional Shards like If and When. \r\n It will parse through a sequence and check if any of the elements in the sequence is of lower value or equal to the value provided in\r\n the Value parameter. If at least one element is of lower or equal to the value, the Shard will return true, otherwise, it will return false. \r\n The data type provided as input and provided in the Value Parameter must be of the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if any value in a sequence is of lower value than something.","role":"user"},{"content":"\r\n [3 3 3 3 1] = sequence\r\n\r\n sequence\r\n If(IsAnyLess(2) {Msg(\"one match\")} {Msg(\"none match\")})\r\n \r\n [3 3 3 3 1] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAnyLess(Value: 2) Then:{\r\n Msg(\"one match\")\r\n } Else: {\r\n Msg(\"none match\")}\r\n )\r\n \r\n The IsAnyLess Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When.\r\n It will parse through a sequence and check if any of the elements in the sequence is of lower value than the value provided in\r\n the Value parameter. If at least one element is of lower value, the Shard will return true, otherwise, it will return false. \r\n The data type provided as input and provided in the Value Parameter must be of the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if any value in a sequence is of higher value or equal to something.","role":"user"},{"content":"\r\n [1 1 1 1 2] = sequence\r\n\r\n sequence\r\n If(IsAnyMoreEqual(2) {Msg(\"one match\")} {Msg(\"none match\")})\r\n \r\n [1 1 1 1 2] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAnyMoreEqual(Value: 2) Then:{\r\n Msg(\"one match\")\r\n } Else: {\r\n Msg(\"none match\")}\r\n )\r\n \r\n The IsAnyMoreEqual is a Shard that can be used in the Predicate parameter of conditional Shards like If and When.\r\n It will parse through a sequence and check if any of the elements in the sequence is of higher value or equal to the value provided in\r\n the Value parameter. If at least one element is of higher value or equal to the value, the Shard will return true, otherwise, it will return false. \r\n The data type provided as input and provided in the Value Parameter must be of the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if any value in a sequence is of higher value than something.","role":"user"},{"content":"\r\n [1 1 1 1 3] = sequence\r\n\r\n sequence\r\n If(IsAnyMore(2) {Msg(\"one match\")} {Msg(\"none match\")})\r\n \r\n [1 1 1 1 3] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAnyMore(Value: 2) Then:{\r\n Msg(\"one match\")\r\n } Else: {\r\n Msg(\"none match\")}\r\n )\r\n \r\n The IsAnyMore is a Shard that can be used in the Predicate parameter of conditional Shards like If and When.\r\n It will parse through a sequence and check if any of the elements in the sequence is of higher value than the value provided in\r\n the Value parameter. If at least one element is of higher value, the Shard will return true, otherwise, it will return false. \r\n The data type provided as input and provided in the Value Parameter must be of the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if any value in a sequence is not equal to something.","role":"user"},{"content":"\r\n [1 1 1 1 2] = sequence\r\n\r\n sequence\r\n If(IsAnyNot(1) {Msg(\"one match\")} {Msg(\"none match\")})\r\n \r\n [1 1 1 1 2] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAnyNot(Value: 1) Then:{\r\n Msg(\"one match\")\r\n } Else: {\r\n Msg(\"none match\")}\r\n )\r\n \r\n The IsAnyNot is a Shard that can be used in the Predicate parameter of conditional Shards like If and When.\r\n It will parse through a sequence and check if any of the elements in the sequence is not of equal value to the value provided in\r\n the Value parameter. If at least one element is not of equal value, the Shard will return true, otherwise, it will return false. \r\n The data type provided as input and provided in the Value Parameter must be of the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if any value in a sequence equals something.","role":"user"},{"content":"\r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(IsAny(2) {Msg(\"one match\")} {Msg(\"none match\")})\r\n \r\n [1 2 3 4 5 6] = sequence\r\n\r\n sequence\r\n If(Predicat: IsAny(Value: 2) Then:{\r\n Msg(\"one match\")\r\n } Else: {\r\n Msg(\"none match\")}\r\n )\r\n \r\n The IsAny Shard is a Shard that can be used in the Predicate parameter of conditional Shards like If and When.\r\n It will parse through a sequence and check if any of the elements in the sequence matches the value provided in the Value parameter. \r\n If at least one element matches the value, the Shard will return true, otherwise, it will return false. \r\n The data type provided as input and provided in the Value Parameter must be of the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is less than or equals to something else.","role":"user"},{"content":"\r\n variable1\r\n When(IsLessEqual(variable2) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate: IsLessEqual(Value: variable2) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsLessEqual Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is less than or equals to what is\r\n stated in the Value parameter of the Is Shard. In this case, if variable 1 is less than or equals to variable2, the When Shard's Predicate will return true and do what is stated\r\n in Action.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is less than something else.","role":"user"},{"content":"\r\n variable1\r\n When(IsLess(variable2) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:IsLess(Value: variable2) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsLess Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is less than what is\r\n stated in the Value parameter of the Is Shard. In this case, if variable 1 is less than variable2, the When Shard's Predicate will return true and do what is stated\r\n in Action.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is greater than something else.","role":"user"},{"content":"\r\n variable1\r\n When(IsMoreEqual(variable2) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:IsMoreEqual(Value: variable2) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsMoreEqual Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is greater than what is\r\n stated in the Value parameter of the Is Shard. In this case, if variable 1 is greater than or equal to variable2, the When Shard's Predicate will return true and do what is stated\r\n in Action.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is greater than something else.","role":"user"},{"content":"\r\n variable1\r\n When(IsMore(variable2) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:IsMore(Value: variable2) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsMore Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is greater than what is\r\n stated in the Value parameter of the Is Shard. In this case, if variable1 is greater than variable2, the When Shard's Predicate will return true and do what is stated\r\n in Action.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is none.","role":"user"},{"content":"\r\n variable1\r\n When(IsNone {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:IsNone Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsNone Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional shard is none. \r\n In the solution above, if variable1 is none, the When Shard's Predicate will return true and do what is stated in Action.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is not none.","role":"user"},{"content":"\r\n variable1\r\n When(IsNotNone {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:IsNotNone Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsNone Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard is not none. \r\n In the solution above, if variable1 is not none, the When Shard's Predicate will return true and do what is stated in Action.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something is not something else.","role":"user"},{"content":"\r\n variable1\r\n When(IsNot(variable2) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:IsNot(Value: variable2) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The IsNot Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard does not match with what is\r\n stated in the Value parameter of the Is Shard. In the solution above, if variable 1 does not equal variable2, the When Shard's Predicate will return true and execute what is stated\r\n in Action.\r\n\r\n If the input and Value parameter have different data types they will be assessed as inequal by default even if they are numerically equal (for example int 5 is not equal to float 5.0).\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do i check if a wire is running.","role":"user"},{"content":"\r\n IsRunning(wire-to-check)\r\n Log(\"Is wire running\")\r\n \r\n IsRunning(Wire: wire-to-check)\r\n Log(Prefix: \"Is wire running\")\r\n \r\n The IsRunning shard will check if the wire stated in the Wire parameter is running. If it is running, it will return true, and false otherwise. In the solution\r\n provided above, it will check if wire-to-check is running and the output will be Logged through the log shard.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if a variable is a certain type?","role":"user"},{"content":"\r\n variable-to-check ;; use any of the Shards below to check the required type\r\n IsAudio\r\n IsBool\r\n IsBytes\r\n IsColor\r\n IsFloat\r\n IsFloat2\r\n IsFloat3\r\n IsFloat4\r\n IsImage\r\n IsInt\r\n IsInt2\r\n IsInt3\r\n IsInt4\r\n IsSeq\r\n IsString\r\n IsTable\r\n IsWire\r\n \r\n Get(variable-to-check) ;; use any of the Shards below to check the required type\r\n IsAudio\r\n IsBool\r\n IsBytes\r\n IsColor\r\n IsFloat\r\n IsFloat2\r\n IsFloat3\r\n IsFloat4\r\n IsImage\r\n IsInt\r\n IsInt2\r\n IsInt3\r\n IsInt4\r\n IsSeq\r\n IsString\r\n IsTable\r\n IsWire\r\n \r\n The Shards listed above all take in an input and check if they are the corresponding type. They then return true or false accordingly.\r\n They can also be used in the Predicate parameter of conditional Shards like If and When.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I check if something equals something else.","role":"user"},{"content":"\r\n variable1\r\n When(Is(variable2) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(Name:variable1)\r\n When(Predicate:Is(Value: variable2) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The Is Shard when used in the Predicate parameter of a conditional Shard, like When, will check if the input of the conditional Shard matches with what is\r\n stated in the Value parameter of the Is Shard. In this case, if variable 1 matches variable2, the When Shard's Predicate will return true and do what is stated\r\n in action.\r\n\r\n If the input and Value parameter have different data types they will be assessed as inequal by default even if they are numerically equal (for example int 5 is not equal to float 5.0).\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do process a sequence but process only some parts of a sequence.","role":"user"},{"content":"\r\n [1 2 3 4 5] = sequence \r\n\r\n sequence\r\n Limit(3)\r\n | ForEach({\r\n Math.Add(1)\r\n })\r\n \r\n [1 2 3 4 5] = sequence \r\n\r\n sequence\r\n Limit(Max:3)\r\n | ForEach(Apply:{\r\n Math.Add(1)\r\n })\r\n \r\n The Limit Shard takes a sequence as an input and outputs a cut sequence whose length is what is stated in the Max parameter. In the scenario provided under solution,\r\n the Limit Shard will output [1 2 3] and the ForEach Shard will only process these 3 elements.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I load an image.","role":"user"},{"content":"LoadImage(File:filename.png PremultiplyAlpha: true) | GFX.TextureLoadImage(File:filename.png PremultiplyAlpha: true) | GFX.Texture\r\n The LoadImage Shard will output the imge specified in the File parameter. The Premultiplied parameter is switched on or aff depending on\r\n wether the image selected does or does not have alpha. In the case provided under solution, we are feeding the output of the \r\n LoadImage Shard into GFX.Texture for the image to be used as a texture.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I log the type of something in the console","role":"user"},{"content":"\r\n variable-to-log\r\n Log(\"Is wire running\")\r\n \r\n Get(variable-to-log)\r\n Log(Prefix: \"Is wire running\")\r\n \r\n This Shard is used for printing information to the console for debugging purposes. \r\n It can also prefix a message string to the logged output while displaying it in the console.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I log the type of a variable in the console","role":"user"},{"content":"\r\n variable-to-log\r\n LogType(\"Is wire running\")\r\n \r\n Get(variable-to-log)\r\n LogType(Prefix: \"Is wire running\")\r\n \r\n Prints the type of the passed variable to the console. \r\n It can also prefix a message string to the logged output while displaying it in the console.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do i get the lowest value from a table ?","role":"user"},{"content":"[1 2 3 4 5] = seq\r\n Lowest\r\n Log(\"resulting\")[1 2 3 4 5] = seq\r\n Lowest\r\n Log(Prefix:\"resulting\")\r\n The Lowest Shard will parse a sequence and return the element with the lowest \"value\". If it is a sequence of integers or floats it will return the element with\r\n the lowest integer or float. If it is a sequence of strings it will return the element with the lowest value based on the lexicographical order.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I do an action for each element in a sequence and get the modified sequence?","role":"user"},{"content":"\r\n [1 2 3 4 5] = sequence\r\n\r\n sequence\r\n Map(\r\n Apply:{\r\n Math.Add(1)\r\n Log(\"result-map-each-element\")\r\n }\r\n )\r\n Log(\"result-map-modified-sequence\")\r\n \r\n [1 2 3 4 5] = sequence\r\n\r\n Get(Name:sequence)\r\n Map(\r\n Apply:{\r\n Math.Add(1)\r\n Log(Prefix:\"result-map-each-element\")\r\n }\r\n )\r\n Log(Prefix:\"result-map-modified-sequence\")\r\n \r\n Map, processes every element of a sequence with a given Shard or sequence of Shards. Unlike the ForEach Shard, Map will output the resulting modified sequence.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I compare an input with multiple cases an execute ones that are true.","role":"user"},{"content":"\r\n 1 = value\r\n \r\n value\r\n Match([\r\n 1 {\r\n Log(\"value is 1\")\r\n }\r\n\r\n 2 {\r\n Log(\"value is 2\")\r\n }\r\n\r\n 3 {\r\n Log(\"value is 3\")\r\n }\r\n ]\r\n false)\r\n \r\n 1 = value\r\n \r\n value\r\n Match( Cases: [\r\n 1 {\r\n Log(\"value is 1\")\r\n }\r\n\r\n 2 {\r\n Log(\"value is 2\")\r\n }\r\n\r\n 3 {\r\n Log(\"value is 3\")\r\n }\r\n ]\r\n Passthrough: false)\r\n \r\n The Match Shard Compares the input with the declared cases (in order of the declaration) and activates the shard of the first matched case. If there are no matched\r\n cases, the program will panic.\r\n\r\n The Passthrough parameter set to true will allow the original input (the one that was used to match against every case in the shard) to be returned as the final \r\n output of Match, irrespective of the case match results. Setting Passthrough to false will enable the matched case's shard output to be returned as the final \r\n output of Match.\r\n\r\n However, for Passthrough to work correctly, the data types of the shard input and the shard's case outputs must match.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do i change all the low values in a sequence to another value.","role":"user"},{"content":"[1 2 3 4 5] >= sequence\r\n\r\n sequence\r\n Max(Operand: 3) ;; change the operand accordingly to the desirec value\r\n > sequence\r\n Log(\"resulting sequence\")\r\n ;; [3 3 3 4 5]\r\n [1 2 3 4 5] >= sequence\r\n\r\n sequence\r\n Max(Operand: 3) ;; change the operand accordingly to the desirec value\r\n > sequence\r\n Log(\"resulting sequence\")\r\n ;; [3 3 3 4 5]\r\n \r\n This Shard compares the input to its Operand parameter and outputs the greater of the two values.\r\n\r\n If the input is a sequence and the Operand parameter a single number, each input element is compared with the Operand parameter and the greater value from each comparison is collected and output as a sequence.\r\n\r\n If the input and Operand parameter both are sequences, each element of the input sequence is compared with the corresponding-index element in the Operand parameter sequence and the greater value from each comparison is collected and output as a sequence.\r\n\r\n If the input sequence is smaller in size than the Operand parameter sequence the comparison stops with the last element of the input sequence. If the Operand parameter sequence is smaller the remaining input sequence elements loop over the Operand parameter sequence till all input sequence elements have been compared.\r\n\r\n This Shard works only on numbers (integers, floats) and on sequences of such numbers. The data types of the input and the Operand parameters must match.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I attempt to execute an action but do another action if I fail","role":"user"},{"content":"[1 2 3] = sequence\r\n\r\n sequence\r\n Maybe(\r\n Shards: Take(3)\r\n Else: Take(0)\r\n Silent: false\r\n )\r\n Log(\"result\")[1 2 3] = sequence\r\n\r\n sequence\r\n Maybe(\r\n Shards: Take(3)\r\n Else: Take(0)\r\n Silent: false\r\n )\r\n Log(\"result\")\r\n The Maybe Shard attempts to activate a Shard or a sequence of Shards. Upon failure, it will activate another Shard or sequence of Shards specified in the Else parameter.\r\n If set to true, the Silent parameter will disable logging while running the Shard and no warning message should be printed on failure.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I combine two tables together?","role":"user"},{"content":"{k1: 1 k2: 2 k3: 3} >= table1\r\n {k4: 4 k5: 5 k6: 6} >= table2\r\n\r\n table2\r\n Merge(table1)\r\n Log(\"resulting table\"){k1: 1 k2: 2 k3: 3} >= table1\r\n {k4: 4 k5: 5 k6: 6} >= table2\r\n\r\n Get(Name:table2)\r\n Merge(Target:table1)\r\n Log(Prefix:\"resulting table\")\r\n Merge, combines two tables into one, with the input table taking priority over the table passed into the Target parameter. That is, if table2 has similar keys to table1\r\n the output table will have table2's value for those similar keys.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do i change all the low values in a sequence to another value.","role":"user"},{"content":"[1 2 3 4 5] >= sequence\r\n\r\n sequence\r\n Min(Operand: 3) ;; change the operand accordingly to the desirec value\r\n > sequence\r\n Log(\"resulting sequence\")\r\n ;; [3 3 3 4 5][1 2 3 4 5] >= sequence\r\n\r\n sequence\r\n Min(Operand: 3) ;; change the operand accordingly to the desirec value\r\n > sequence\r\n Log(\"resulting sequence\")\r\n ;; [3 3 3 4 5]\r\n This shard compares the input to its Operand parameter and outputs the lesser of the two values.\r\n\r\n If the input is a sequence and the Operand parameter a single number, each input element is compared with the Operand parameter and the lesser value from each comparison is collected and output as a sequence.\r\n\r\n If the input and Operand parameter both are sequences, each element of the input sequence is compared with the corresponding-index element in the Operand parameter sequence and the lesser value from each comparison is collected and output as a sequence.\r\n\r\n If the input sequence is smaller in size than the Operand parameter sequence the comparison stops with the last element of the input sequence. If the Operand parameter sequence is smaller the remaining input sequence elements loop over the Operand parameter sequence till all input sequence elements have been compared.\r\n\r\n This shard works only on numbers (integers, floats) and on sequences of such numbers. The data types of the input and the Operand parameters must match.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I display a message on the console","role":"user"},{"content":"Msg(\"Type your message here\")Msg(Message:\"Type your message here\")\r\n This Shard is used for displaying messages to the user on the standard output (which is usually the console).\r\n The message to display can be passed to this Shard either as a string or as a string variable holding a value. \r\n In case a variable is passed the Shard displays the variable's value.\r\n Unlike Log, Msg does not print its input.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute something only once","role":"user"},{"content":"Once({\r\n Msg(\"This will only execute once\")\r\n })Once( Action:{\r\n Msg(\"This will only execute once\")\r\n } Every: 0)\r\n When the Once Shard has 0 in the Every parameter, it will execute what is stated in the Action parameter only once per flow execution.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute something once every few seconds.","role":"user"},{"content":"Once({\r\n Msg(\"This will only execute once\")\r\n } 1.0)Once( Action:{\r\n Msg(\"This will only execute once\")\r\n } Every: 1.0)\r\n The Once shard will execute what is stated in the Action parameter every X amount of seconds, where X is the number stated in the Every parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a conditional statement with more than one conditon, that returns true when either of its predicates is fulfilled.","role":"user"},{"content":"2 = variable\r\n \r\n variable\r\n When({Is(1) | Or | variable | Is(2)} {\r\n Log(\"condition met\")\r\n })2 = variable\r\n \r\n Get(variable)\r\n When(Predicate:{Is(1) | Or | Get(variable) | Is(2)} Action:{\r\n Log(\"condition met\")\r\n })\r\n The Or statement is a Shard that is used to chain multiple Conditional statements together. If either of the conditions chained are met,\r\n the Predicate parameter will return true and execute what is dictated in the Action Parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I have an action that does nothing.","role":"user"},{"content":"\r\n 2 = variable\r\n \r\n variable\r\n When({Is(2)} {\r\n Pass\r\n })\r\n 2 = variable\r\n \r\n Get(variable)\r\n When(Predicate:{Is(2)} Action:{\r\n Pass\r\n })\r\n The Pass Shard makes an action parameter do nothing and return back its input.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I remove the first element in the sequence and get the element that was removed?","role":"user"},{"content":"\r\n PopFront(sequence-to-drop)\r\n Log(\"Remaining Sequence\")\r\n \r\n PopFront(Name: sequence-to-drop)\r\n Log(Prefix: \"Remaining Sequence\")\r\n \r\n PopFront removes the first element of the sequence variable that has been passed to in the :Name parameter. Unlike the Drop Shard, Pop will return the popped element\r\n as output.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I remove the last element in the sequence and get the element that was removed?","role":"user"},{"content":"\r\n Pop(sequence-to-drop)\r\n Log(\"Remaining Sequence\")\r\n \r\n Pop(Name: sequence-to-drop)\r\n Log(Prefix: \"Remaining Sequence\")\r\n \r\n Pop removes the last element of the sequence variable that has been passed to in the :Name parameter. Unlike the Drop Shard, which will return \r\n the modified sequence, Pop will return the popped element as output.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do add something to thhe front of a sequence.","role":"user"},{"content":"\r\n [1 2 3 4 5] >= sequence\r\n 0 | PrependTo(sequence)\r\n \r\n sequence\r\n Log(\"result\")\r\n [1 2 3 4 5] >= sequence\r\n 0 | PrependTo(Collection: sequence)\r\n \r\n sequence\r\n Log(Prefix: \"result\")\r\n PrependTo will add what is inputed to the sequence stated in the Collection parameter. The PrependTo shard will not output the resulting sequence but still modify it.\r\n Ensure that the input type matches the sequence type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How to add a new element to an existing Shards sequence?","role":"user"},{"content":"\r\n element >> sequence\r\n \r\n Get(element) | Push(sequence)\r\n \r\n The Push method is used to add a new element to the end of a sequence. The type of element being pushed must be pushed into a sequence of the same\r\n types of elements.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get a random integer.","role":"user"},{"content":"\r\n RandomInt(50) ;; Replace with desired size\r\n \r\n RandomInt(Size: 50) ;; Replace with desired size\r\n \r\n The RandomBytes Shard will return randomized bytes, of the size specified in the Size parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get a random float","role":"user"},{"content":"\r\n RandomFloat(50.0) ;; Replace with desired Max, non-inlcusive\r\n \r\n RandomFloat(Max: 50.0) ;; Replace with desired Max, non-inlcusive\r\n \r\n The RandomInt Shard will return a random integer between the values 0 and the value specified in the Max parameter (non-inclusive).\r\n The returned float will always be to the 4th decimal place. Use Math.Add or Math.Subtract to modify the lower limit. \r\n For example, to get a random integer from the range of 2.0-50.0 you can use the RandomFloat(48.0) | Math.Add(2.0).\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get a random integer.","role":"user"},{"content":"\r\n RandomInt(50) ;; Replace with desired Max, non-inlcusive\r\n \r\n RandomInt(Max: 50) ;; Replace with desired Max, non-inlcusive\r\n \r\n The RandomInt Shard will return a random integer between the values 0 and the value specified in the Max parameter (non-inclusive). Use Math.Add or Math.Subtract\r\n to modify the lower limit. For example, to get a random integer from the range of 2-50 you can use the RandomInt(48) | Math.Add(2).\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I repeat something multiple times.","role":"user"},{"content":"\r\n Repeat({\r\n Pass ;; Action to repeat\r\n } 5)\r\n \r\n Repeat(Action:{\r\n Pass ;; Action to repeat\r\n } Times: 5)\r\n \r\n Repeat will execute whatever is specified in the Action parameter X number of times, where X is the amount specified in the Times parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I repeat something multiple times until a certain condition is false.","role":"user"},{"content":"\r\n \r\n 0 >= n\r\n \r\n Repeat({\r\n n | Math.Add(1) > n\r\n }\r\n true\r\n {n | IsMore(3)})\r\n \r\n 0 | Set(Name:n)\r\n \r\n Repeat( Action:{\r\n n | Math.Add(1) > n\r\n }\r\n Forever: true\r\n Until: n | IsMore(3))\r\n \r\n Repeat will execute whatever is specified in the Action parameter forever until the condition specified in the Until parameter is met.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I replace a elements in a sequence.","role":"user"},{"content":"\r\n [ 0 1 2 3 4 5] >= sequence\r\n\r\n sequence\r\n Replace(\r\n [1]\r\n [2]\r\n )\r\n Log(\"result\")\r\n \r\n [ 0 1 2 3 4 5] >= sequence\r\n\r\n Get(sequence)\r\n Replace(\r\n Patterns: [1 4]\r\n Replacements: [2 2]\r\n )\r\n Log(Prefix:\"result\") ;; Result will be\r\n \r\n The Replace Shard will take a sequence as input and replace all elements with indeces specified in the Patterns parameter, with the corresponding\r\n element in the sequence in the Replacements parameter. The Patterns seqeuence and the Replacements sequence need to be of the same length.\r\n The Replace shard outputs the resulting modified sequence.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get a segment from a sequence.","role":"user"},{"content":"\r\n [ 0 1 2 3 4 5] >= sequence\r\n\r\n sequence\r\n Slice(0 3 1)\r\n Log(\"result\")\r\n \r\n [ 0 1 2 3 4 5] >= sequence\r\n\r\n Get(sequence)\r\n Slice(\r\n From: 0 \r\n To: 3 \r\n Step: 1\r\n )\r\n Log(Prefix:\"result\")\r\n ;; Result will be a seuence [0 1 2]\r\n \r\n Slice is a Shard that will get a segment from a sequence. It takes from the element indicated in the From parameter to the element\r\n indicated in the To parameter and every X element in between. Where X is specified in the Step parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I sort all the values of a sequence in ascending order?","role":"user"},{"content":"\r\n [0 1 2 3 4 5] >= sequence\r\n\r\n Sort (\r\n sequence\r\n )\r\n \r\n [0 1 2 3 4 5] >= sequence\r\n\r\n Sort (\r\n From: sequence\r\n ;; Join: sequenceB\r\n ;; Desc: false\r\n ;; Key: \r\n\r\n )\r\n \r\n Sort is a Shard that will parse through the sequence specified in the From parameter and sort it. \r\n If Desc is set to true the sequence is sorted in descending order, else it's sorted in the ascending order\r\n If another sequence is passed into the Join parameter. The sequence in the Join parameter will mirror the final arrangement\r\n of the sequence passed into the From parameter. For this to work, both sequences need to be of the same length.\r\n\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I sort all the values of a sequence in descending order?","role":"user"},{"content":"\r\n [0 1 2 3 4 5] >= sequence\r\n\r\n Sort (\r\n sequence\r\n Desc: true\r\n )\r\n \r\n [0 1 2 3 4 5] >= sequence\r\n\r\n Sort (\r\n From: sequence\r\n ;; Join: sequenceB\r\n Desc: true\r\n ;; Key: \r\n\r\n )\r\n \r\n Sort is a Shard that will parse through the sequence specified in the From parameter and sort it. \r\n If :Desc is set to true the sequence is sorted in descending order, else it's sorted in the ascending order\r\n If another sequence is passed into the Join parameter. The sequence in the Join parameter will mirror the final arrangement\r\n of the sequence passed into the From parameter. For this to work, both sequences need to be of the same length.\r\n \r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute a combination of Shards without consuming the input.","role":"user"},{"content":"\r\n 2 >= values\r\n\r\n Sub({\r\n Math.Multiply(2)\r\n Log(\"result1:\")\r\n })\r\n Log(\"result2:\")\r\n \r\n 2 | Set(Name:values)\r\n\r\n Sub(Shards:{\r\n Math.Multiply(Operand:2)\r\n Log(Prefix:\"result1:\")\r\n })\r\n Log(Prefix:\"result2:\")\r\n \r\n Sub is a Shard that activates a Shard or a sequence of Shards independently, without consuming the input. \r\n I.e. the input of the Sub flow will also be its output regardless of the Shards activated in this Sub flow.\r\n \r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I swap the values of two variables.","role":"user"},{"content":"\r\n 2 >= variableA\r\n 4 >= variableB\r\n\r\n Swap(\r\n variableA\r\n variableB\r\n )\r\n \r\n 2 | Set(Name:variableA)\r\n 4 | Set(Name:variableB)\r\n\r\n Swap(\r\n NameA:variableA\r\n NameB:variableB\r\n )\r\n \r\n The Swap Shard swaps the values of the two variables passed to it via :NameA and :NameB parameters. This Shard can only swap the values\r\n of two variables with the same type.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create an empty Table?","role":"user"},{"content":"\r\n Table(table-created)\r\n \r\n Table(\r\n Name: table-created\r\n ;;Global:\r\n ;;Type:\r\n )\r\n \r\n Table creates an empty table with or without a specified key (via the :Key parameter). \r\n The created table name is defined in the :Name parameter.\r\n\r\n Whether the created table variable has a global scope (available to all wires on the mesh) or a local scope \r\n (available only to the wire its defined in) can be controlled via the Global parameter (true for global scope, false \r\n for local scope; default is false).\r\n\r\n In addition to the key and the scope, this shard can also define the table's inner data types via the Types parameter.\r\n More than one data type may be set.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get an element of a specific index in a sequence?","role":"user"},{"content":"\r\n [0 1 2 3 4] = sequence\r\n\r\n sequence\r\n Take() ;; Replace 0 accordingly with the desired index\r\n \r\n [0 1 2 3 4] = sequence\r\n\r\n\r\n Get(sequence)\r\n Take([0]) ;; Replace 0 accordingly with the desired index\r\n \r\n Take will get and return the specific element from the sequence passed in as input. The element it gets is of the index specified in its parameter. A\r\n sequence of indices can also be specified in its parameter. If a sequence of indices is specified, Take will return a sequence of elements. These elements are\r\n derived from the sequence passed in as input and are of the indeces specified in the sequence of indices. In the scenario provided under solution, Take will return\r\n the 0th element from the sequence.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get an element of a specific key in a table.","role":"user"},{"content":"\r\n {k0: 0 k1: 1 k2: 2 k3: 3 k4: 4} = sequence\r\n\r\n sequence\r\n Take(\"k0\") ;; Replace 0 accordingly with the desired index\r\n \r\n {k0: 0 k1: 1 k2: 2 k3: 3 k4: 4} = sequence\r\n\r\n sequence\r\n Take(\"k0\") ;; Replace 0 accordingly with the desired index\r\n \r\n Take will get and return the specific element from the specified key from the table passed in as input. Take can also be used to return a specific element from\r\n a sequence or return an array of elements from a sequence.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert bytes to Base58","role":"user"},{"content":"\r\n 5\r\n ToBytes\r\n ToBase58\r\n \r\n 5\r\n ToBytes\r\n ToBase58\r\n \r\n ToBase58 is a Shard that takes in bytes as input and outputs a base58 format string.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert bytes to Base64","role":"user"},{"content":"\r\n 5\r\n ToBytes\r\n ToBase64\r\n \r\n 5\r\n ToBytes\r\n ToBase64\r\n \r\n ToBase64 is a Shard that takes in bytes as input and outputs a base64 format string.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert something to Bytes","role":"user"},{"content":"\r\n 5\r\n ToBytes\r\n \r\n 5\r\n ToBytes\r\n \r\n ToBytes is a Shard that converts what is fed into input into bytes in its serialized form.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a integer to a RGBA color value","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToColor\r\n \r\n 5 ; integer to convert\r\n ToColor\r\n \r\n The ToColor Shard converts an input with numeric value into 4-dimensional color vector represented as four integers.\r\n The first integer represents the Red value, the second integer represents the Green value, the third integer represents the Blue value and the last integer represents the Alpha.\r\n The value will always be rounded down to the nearest integer. If the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. \r\n For example, in the solution provided above, ToInt4 will output (5 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers. \r\n If the value has more than 4 dimensions, only the first four values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to a RGBA color value","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToColor\r\n \r\n 5.0 ; float to convert\r\n ToColor\r\n \r\n The ToColor Shard converts an input with numeric value into 4-dimensional color vector represented as four integers.\r\n The first integer represents the Red value, the second integer represents the Green value, the third integer represents the Blue value and the last integer represents the Alpha.\r\n The value will always be rounded down to the nearest integer. If the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. \r\n For example, in the solution provided above, ToInt4 will output (5 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers. \r\n If the value has more than 4 dimensions, only the first four values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to a RGBA color value","role":"user"},{"content":"\r\n \"5.0\" ; string to convert\r\n ToInt\r\n \r\n \"5.0\" ; string to convert\r\n ToInt\r\n \r\n The ToColor Shard converts an input with numeric value into 4-dimensional color vector represented as four integers.\r\n The first integer represents the Red value, the second integer represents the Green value, the third integer represents the Blue value and the last integer represents the Alpha.\r\n The value will always be rounded down to the nearest integer. If the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. \r\n For example, in the solution provided above, ToInt4 will output (5 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers. \r\n If the value has more than 4 dimensions, only the first four values will be used.\r\n If a string that has no numeric value such as \"Three\", \"Five\"or \"hello\" is passed in, the Shard will return (0 0 0 0)\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to a float2?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToFloat2\r\n \r\n 5 ; integer to convert\r\n ToFloat2\r\n \r\n The ToFloat2 Shard converts an input with numeric value into 2-dimensional vector represented as two floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second floating point number.For example, in the solution provided above, ToFloat2 will out put (5.0 0.0). If the input is two\r\n dimensional, it will assign the floating point numbers accordingly. If the input has more than 2 dimensions, the Shard will only use the first 2 values provided.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to a float2?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToFloat2\r\n \r\n 5.0 ; float to convert\r\n ToFloat2\r\n \r\n The ToFloat2 Shard converts an input with numeric value into 2-dimensional vector represented as two floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second floating point number.For example, in the solution provided above, ToFloat2 will out put (5.0 0.0). If the input is two\r\n dimensional, it will assign the floating point numbers accordingly. If the input has more than 2 dimensions, the Shard will only use the first 2 values provided.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to a float2?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToFloat2\r\n \r\n \"5\" ; string to convert\r\n ToFloat2\r\n \r\n The ToFloat2 Shard converts an input with numeric value into 2-dimensional vector represented as two floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second floating point number.For example, in the solution provided above, ToFloat2 will out put (5.0 0.0). If the input is two\r\n dimensional, such as \"3 2\" it will assign the floating point numbers accordingly. If the input has more than 2 dimensions, the Shard will only use the first 2 values provided.\r\n If a string that has no numeric value such as \"Three\", \"Five\"or \"hello\" is passed in, the Shard will return (0.0 0.0)\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to a float3?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToFloat3\r\n \r\n 5 ; integer to convert\r\n ToFloat3\r\n \r\n The ToFloat3 Shard converts an input with numeric value into 3-dimensional vector represented as three floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second and third floating point number.For example, in the solution provided above, ToFloat3 will out put (5.0 0.0 0.0). If the input is two\r\n dimensional, it will assign 0.0 to the third floating point number. If the input has more than 3 dimensions, the Shard will only use the first 3 values provided.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to a float3?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToFloat3\r\n \r\n 5.0 ; float to convert\r\n ToFloat3\r\n \r\n The ToFloat3 Shard converts an input with numeric value into 3-dimensional vector represented as three floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second second and third floating point number.For example, in the solution provided above, ToFloat3 will out put (5.0 0.0 0.0). If the input is two\r\n dimensional, it will assign 0.0 to the third floating point number. If the input has more than 3 dimensions, the Shard will only use the first 3 values provided.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to a float3?","role":"user"},{"content":"\r\n \"5.0\" ; string to convert\r\n ToFloat3\r\n \r\n \"5.0\" ; string to convert\r\n ToFloat3\r\n \r\n The ToFloat3 Shard converts an input with numeric value into 3-dimensional vector represented as three floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second second and third floating point number.For example, in the solution provided above, ToFloat3 will out put (5.0 0.0 0.0). If the input is two\r\n dimensional, it will assign 0.0 to the third floating point number. If the input has more than 3 dimensions, the Shard will only use the first 3 values provided.\r\n If a string that has no numeric value like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0.0 0.0 0.0)\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to a float4?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToFloat4\r\n \r\n 5 ; integer to convert\r\n ToFloat4\r\n \r\n The ToFloat4 Shard converts an input with numeric value into 4-dimensional vector represented as four floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second, third and fourth floating point number. For example, in the solution provided above, ToFloat4 will output (5.0 0.0 0.0 0.0). If the input is two\r\n dimensional, it will assign 0.0 to the third and fourth floating point number. If the input has more than 4 dimensions, the Shard will only use the first 4 values provided.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to a float4?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToFloat4\r\n \r\n 5.0 ; float to convert\r\n ToFloat4\r\n \r\n The ToFloat4 Shard converts an input with numeric value into 4-dimensional vector represented as four floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second, third and fourth floating point number in the solution provided above, ToFloat4 will output (5.0 0.0 0.0 0.0). If the input is two\r\n dimensional, it will assign 0.0 to the third and fourth floating point number. If the input has more than 4 dimensions, the Shard will only use the first 4 values provided.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to a float4?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToFloat4\r\n \r\n \"5\" ; string to convert\r\n ToFloat4\r\n \r\n The ToFloat4 Shard converts an input with numeric value into 4-dimensional vector represented as four floating point numbers. If the input is one dimensional, \r\n the Shard will assign 0.0 to the second, third and fourth floating point number in the solution provided above, ToFloat4 will output (5.0 0.0 0.0 0.0). If the input is two\r\n dimensional, it will assign 0.0 to the third and fourth floating point number. If the input has more than 4 dimensions, the Shard will only use the first 4 values provided.\r\n If a string that has no numeric value like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0.0 0.0 0.0 0.0)\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to a float?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToFloat\r\n \r\n 5 ; integer to convert\r\n ToFloat\r\n \r\n The ToFloat Shard takes in a integer or a string with numeric value and converts it into a float. If the\r\n value has more than one dimension, only the first value will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to a float?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToFloat\r\n \r\n \"5\" ; string to convert\r\n ToFloat\r\n \r\n The ToFloat Shard takes in a integer or a string with numeric value and converts it into a float. If a string that has no numeric value like \"Three\", \"Five\"\r\n or \"hello\" is passed in, the Shard will return 0.0. If the value has more than one dimension, only the first value will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to an hexidecimal value?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToHex\r\n \r\n 5 ; integer to convert\r\n ToHex\r\n \r\n The ToHex Shard takes in either an integer, bytes or a string and converts it into a hexidecimal value\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a byte to an hexidecimal value?","role":"user"},{"content":"\r\n 5 ; byte to convert\r\n ToHex\r\n \r\n 5 ; byte to convert\r\n ToHex\r\n \r\n The ToHex Shard takes in either an integer, bytes or a string and converts it into a hexidecimal value\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an hexidecimal value?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToHex\r\n \r\n \"5\" ; string to convert\r\n ToHex\r\n \r\n The ToHex Shard takes in either an integer, bytes or a string and converts it into a hexidecimal value\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to an int16?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n The ToInt16 Shard converts an input with numeric value into 16-dimensional vector represented as 16 integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and o forth. For example, in the solution provided above, ToInt16 will output \r\n (5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 16 dimensions, \r\n only the first 16 values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to an int16?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToInt\r\n \r\n 5 ; integer to convert\r\n ToInt\r\n \r\n The ToInt16 Shard converts an input with numeric value into 16-dimensional vector represented as 16 integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and o forth. For example, in the solution provided above, ToInt16 will output \r\n (5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 16 dimensions, \r\n only the first 16 values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an int16?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n The ToInt16 Shard converts an input with numeric value into 16-dimensional vector represented as 16 integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and o forth. For example, in the solution provided above, ToInt16 will output \r\n (5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 16 dimensions, \r\n only the first 16 values will be used. If a string that has no numeric value, like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0). \r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to an int2?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second integer.For example, in the solution provided above, ToInt2 will output (5 0). If the input is two\r\n dimensional, it will assign the integers accordingly. If the value has more than 2 dimensions, only the first two values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an int2?","role":"user"},{"content":"\r\n \"5.0\" ; string to convert\r\n ToInt\r\n \r\n \"5.0\" ; string to convert\r\n ToInt\r\n \r\n The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second integer.For example, in the solution provided above, ToInt2 will output (5 0). If the input is two\r\n dimensional, it will assign the integers accordingly. If the value has more than 2 dimensions, only the first two values will be used. If a string that has no numeric \r\n value like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0 0).\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to an int2?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToInt\r\n \r\n 5 ; integer to convert\r\n ToInt\r\n \r\n The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second integer.For example, in the solution provided above, ToInt2 will output (5 0). If the input is two\r\n dimensional, it will assign the integers accordingly. If the value has more than 2 dimensions, only the first two values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to an int3?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n The ToInt3 Shard converts an input with numeric value into 3-dimensional vector represented as three integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second and third integers. For example, in the solution provided above, ToInt3 will output (5 0 0). If the input is two\r\n dimensional, it will assign 0 to the third integer. If the value has more than 3 dimensions, only the first three values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to an int3?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToInt\r\n \r\n 5 ; integer to convert\r\n ToInt\r\n \r\n The ToInt3 Shard converts an input with numeric value into 3-dimensional vector represented as three integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second and third integers. For example, in the solution provided above, ToInt3 will output (5 0 0). If the input is two\r\n dimensional, it will assign 0 to the third integer. If the value has more than 3 dimensions, only the first three values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an int3?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n The ToInt3 Shard converts an input with numeric value into 3-dimensional vector represented as three integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second and third integers. For example, in the solution provided above, ToInt3 will output (5 0 0). If the input is two\r\n dimensional, it will assign 0 to the third integer. If the value has more than 3 dimensions, only the first three values will be used. If a string that has no numeric \r\n value like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0 0 0 0). \r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to an int4?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n The ToInt4 Shard converts an input with numeric value into 4-dimensional vector represented as four integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. For example, in the solution provided above, ToInt4 will output (5 0 0 0). \r\n If the input is two dimensional, it will assign 0 to the third and fourth integers. If the value has more than 4 dimensions, only the first four values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a int to an int4?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToInt\r\n \r\n 5 ; integer to convert\r\n ToInt\r\n \r\n The ToInt4 Shard converts an input with numeric value into 4-dimensional vector represented as four integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. For example, in the solution provided above, ToInt4 will output (5 0 0 0). \r\n If the input is two dimensional, it will assign 0 to the third and fourth integers. If the value has more than 4 dimensions, only the first four values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an int4?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n \"5\" ; atring to convert\r\n ToInt\r\n \r\n The ToInt4 Shard converts an input with numeric value into 4-dimensional vector represented as four integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers. For example, in the solution provided above, ToInt4 will output (5 0 0 0). \r\n If the input is two dimensional, it will assign 0 to the third and fourth integers. If the value has more than 4 dimensions, only the first four values will be used.\r\n If a string that has no numeric value, like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0 0 0 0). \r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to an int8?","role":"user"},{"content":"\r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n 5.0 ; float to convert\r\n ToInt\r\n \r\n The ToInt8 Shard converts an input with numeric value into 8-dimensional vector represented as eight integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and so forth. For example, in the solution provided above, ToInt4 will output \r\n (5 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 8 dimensions, only \r\n the first eight values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert an integer to an int8?","role":"user"},{"content":"\r\n 5 ; integer to convert\r\n ToInt\r\n \r\n 5 ; integer to convert\r\n ToInt\r\n \r\n The ToInt8 Shard converts an input with numeric value into 8-dimensional vector represented as eight integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and so forth. For example, in the solution provided above, ToInt8 will output \r\n (5 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 8 dimensions, only \r\n the first eight values will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an int8?","role":"user"},{"content":"\r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n \"5\" ; string to convert\r\n ToInt\r\n \r\n The ToInt8 Shard converts an input with numeric value into 8-dimensional vector represented as eight integers. The value will always be rounded down to the nearest integer. If \r\n the input is one dimensional, the Shard will assign 0 to the second, third and fourth integers and so forth. For example, in the solution provided above, ToInt8 will output \r\n (5 0 0 0 0 0 0 0). If the input is two dimensional, it will assign 0 to the third and fourth integers and so forth. If the value has more than 8 dimensions, only \r\n the first eight values will be used. If a string that has no numeric value, like \"Three\", \"Five\" or \"hello\" is passed in, the Shard will return (0 0 0 0 0 0 0 0).\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a float to an integer?","role":"user"},{"content":"\r\n 5.0 ; integer to convert\r\n ToInt\r\n \r\n 5.0 ; integer to convert\r\n ToInt\r\n \r\n The ToInt Shard takes in a float or a string with numeric value and converts it into a integer. The value will always be rounded down to the nearest integer. If the\r\n value has more than one dimension, only the first value will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert a string to an integer?","role":"user"},{"content":"\r\n \"5.0\" ; string to convert\r\n ToInt\r\n \r\n \"5.0\" ; string to convert\r\n ToInt\r\n \r\n The ToInt2 Shard converts an input with numeric value into 2-dimensional vector represented as two integers. The value will always be rounded down to the nearest integer. If a string that has no numeric value like \"Three\", \"Five\"\r\n or \"hello\" is passed in, the Shard will return 0. If the value has more than one dimension, only the first value will be used.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert something to JSON format","role":"user"},{"content":"\r\n table-of-values\r\n ToJSON\r\n \r\n table-of-values\r\n ToJSON(Pure: true Indent:0)\r\n \r\n ToJSON is a shard that will convert any data type and output a string in the JSON format. The Pure parameter is set true or false,\r\n depending if the input string is generic pure json rather then shards flavored json. The Indent parameter \r\n dictates how many spaces to use as json prettify indent.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do i convert and int to Leb128 format?","role":"user"},{"content":"\r\n 5 ; int to convert\r\n ToLEB128(Signed:false)\r\n \r\n 5 ; int to convert\r\n ToLEB128(Signed:false)\r\n \r\n ToLEB128 will convert an int to a LEB128 format. The Signed parameter is for if the integer to encode/decode is signed and can be negative.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert something to a string","role":"user"},{"content":"\r\n 5 ; string to convert\r\n ToString\r\n ;;Will output \"5\"\r\n \r\n 5 ; string to convert\r\n ToString\r\n ;;Will output \"5\"\r\n \r\n ToString converts any data type and outputs a string. \r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I update a variable?","role":"user"},{"content":"\r\n 5 > variable-to-update\r\n \r\n 5 | Update(Name:variable-to-update)\r\n \r\n Update modifies the value of an existing mutable variable. Do note that update cannot be used to modify the value of a single element in a sequence, it can\r\n only be used to replace the whole sequence. To update a single element in a sequence, use Assoc instead.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I update a key in a table","role":"user"},{"content":"\r\n 5 | Update(variable-to-update \"key1\")\r\n \r\n 5 | Update(Name:variable-to-update Key: \"key1\")\r\n \r\n For an existing table, Update can only change the existing keys' values. \r\n It cannot add new key-value pairs to the table (do that with Set). To update existing key-values in a table you need to pass the key in the :Key parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I wait for another wire to finish executing before resuming the current wire?","role":"user"},{"content":"\r\n Detach(myWire)\r\n Wait(\r\n ;Wire:\r\n \"myWire\"\r\n ;Passthrough:\r\n false\r\n ;Timeout:\r\n )\r\n \r\n Detach(myWire)\r\n Wait(\r\n Wire: \"myWire\"\r\n Passthrough: false\r\n ;Timeout:\r\n )\r\n \r\n The Wait Shard waits for another wire to complete before resuming execution of the current wire. The Passthrough parameter ensures whether the input of the Shard is passed\r\n as the output. The Timeout parameter, is the amount of time in seconds to wait for the wire to complete, if the time elapses the wire will be stopped and \r\n the flow will fail with a timeout error.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a conditional to do soomething when the condition is not met.","role":"user"},{"content":"\r\n variable1\r\n WhenNot(Is(true) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n WhenNot(Predicate:Is(Value: true) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The WhenNot Shard is a Shard to create a conditional statement. If the conditions stated in the Predicate parameter are not met, it will execute what is stated\r\n in the Action parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a conditional statement to do something when the condition is met.","role":"user"},{"content":"\r\n variable1\r\n When(Is(true) {\r\n Pass ;Do Something\r\n })\r\n \r\n Get(variable1)\r\n When(Predicate:Is(Value: true) Action:{\r\n Pass ;Do Something\r\n })\r\n \r\n The When Shard is a Shard to create a conditional statement. If the conditions stated in the Predicate parameter are met, it will execute what is stated\r\n in the Action parameter.\r\n #General","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute one wire that will run asynchornously to the main wire.","role":"user"},{"content":"\r\n @wire(wire{\r\n Detach(wire-to-run-asynchronously)\r\n })\r\n \r\n @wire(wire{\r\n Detach(Wire:wire-to-run-asynchronously)\r\n })\r\n \r\n Detach will execute a wire concurrently in the background within the same mesh as the parent wire. Only one wire of each unique wire\r\n can be detached at any point in time. Subsequent detaches of the same wire, will be ignored. \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute and generate multiple wires that will execute inline to the parent wire.","role":"user"},{"content":"\r\n @wire(main-wire{\r\n [1 2 3]\r\n DoMany(other-wire)\r\n })\r\n \r\n @wire(main-wire{\r\n [1 2 3]\r\n Do(Wire:other-wire)\r\n })\r\n \r\n DoMany is a shard that will generate and execute multiple wires inline to the parent wire. As opposed to Do which will only generate\r\n one wire that is reused, DoMany will generate a number of wires depending on the number of elements in the sequence passed in as input.\r\n \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute a wire from the main wire and continue the main wire after complete execution of the executed wire.","role":"user"},{"content":"\r\n @wire(main-wire{\r\n Do(other-wire)\r\n })\r\n \r\n @wire(main-wire{\r\n Do(Wire:other-wire)\r\n })\r\n \r\n The Do Shard is a wire executor. When called, it will run the wire specified in the Wire parameter inline within the current wire.\r\n The called wire will execute from the start every time it is called and run synchronously within the context of the parent wire.\r\n \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I stop a wire from executing momentarily for a period of time","role":"user"},{"content":"\r\n @wire(wire{\r\n Pause(0.5)\r\n })\r\n \r\n @wire(wire{\r\n Pause(Time: 0.5)\r\n })\r\n \r\n The Pause Shard is a Shard that stops a wire from being executed momentarily for a period of time. If the wire is called by a wire \r\n Executor Shard within the time frame specified in the Time parameter, it will be ignored.\r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I resume a wire that has been suspended from the start of the wire?","role":"user"},{"content":"\r\n @wire(wire{\r\n Restart(wire-paused)\r\n })\r\n \r\n @wire(wire{\r\n Restart(Wire:wire-paused)\r\n })\r\n \r\n Restart is a Shard that will resume a previously suspended wire from the start of said wire.\r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I resume a wire that has been suspended from the point of suspension?","role":"user"},{"content":"\r\n @wire(wire{\r\n Resume(wire-paused)\r\n })\r\n \r\n @wire(wire{\r\n Resume(Wire:wire-paused)\r\n })\r\n \r\n Resume will execute a previously suspended wire from the point of suspension.\r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute multiple wires that will run asynchornously to the main wire.","role":"user"},{"content":"\r\n @wire(wire{\r\n Detach(wire-to-run-asynchronously)\r\n })\r\n \r\n @wire(wire{\r\n Detach(Wire:wire-to-run-asynchronously)\r\n })\r\n \r\n Spawn will generate multiple wires that will run concurrently in the background within the same mesh as the parent wire. \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute and generate multiple wires that will execute inline to the parent wire and continue their state whenever called.","role":"user"},{"content":"\r\n @wire(main-wire{\r\n [1 2 3]\r\n DoMany(other-wire)\r\n })\r\n \r\n @wire(main-wire{\r\n [1 2 3]\r\n Do(Wire:other-wire)\r\n })\r\n \r\n StepMany is a Shard that will generate and execute multiple wires inline to the parent wire. As opposed to Step which will only generate\r\n one wire that is reused, StepMany will generate a number of wires depending on the number of elements in the sequence passed in as input.\r\n StepMany will also continue the state of the wires generated whenever called, unlike DoMany and Do which will execute from the beginning of\r\n the wire.\r\n \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I execute a wire that continues its state whenever it is called.","role":"user"},{"content":"\r\n @wire(main-wire{\r\n Step(other-wire-that-continues)\r\n })\r\n \r\n @wire(main-wire{\r\n Step(Wire:other-wire-that-continues)\r\n })\r\n \r\n The Step Shard is a wire executor. When called, it will execute the wire specified in the Wire parameter.\r\n Like the Do Shard, Step will run the specified wire synchronously within the context of the parent wire.\r\n Unlike the Do Shard, which will execute a wire from the start whenever it is called, the Step Shard will continue executing a wire\r\n from where it last left off. For example, if a stepped wire is paused using the Pause Shard, the next time it is called, it will\r\n continue its state from where it last paused.\r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I stop a wire?","role":"user"},{"content":"\r\n @wire(main-wire{\r\n Stop(wire-to-stop)\r\n })\r\n \r\n @wire(main-wire{\r\n Stop(Wire:wire-to-stop)\r\n })\r\n \r\n Stop is a Shard that will stop a wire from executing. The wire can be executed again but it will be executed from the start, unlike\r\n Suspend which can be re-executed from the point of suspension. If no wire is fed into the Wire parameter, it will Stop the current wire.\r\n \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I pause a wire until it is specifically resumed. ","role":"user"},{"content":"\r\n @wire(wire{\r\n Suspend(wire-to-pause)\r\n })\r\n \r\n @wire(wire{\r\n Suspend(Wire:wire-to-pause)\r\n })\r\n \r\n The Suspend shard is a shard that will pause the wire specified in the Wire parameter indefinitely until the Resume or Restart \r\n shards are used to revive the wire. If no wire is fed into the Wire parameter, it will suspend the current wire.\r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I suspend a wire and immediately switch execution to a different wire?","role":"user"},{"content":"\r\n @wire(main-wire{\r\n SwitchTo(wire-to-switch-to false)\r\n })\r\n \r\n @wire(main-wire{\r\n SwitchTo(Wire:wire-to-switch-to Restart:false)\r\n })\r\n \r\n SwitchTo is a shard that suspends the currennt wire and switches execution to the wire specified in the Wire parameter. If the Restart\r\n parameter is set to true, the wire being switched to will restart instead of resuming from its suspended state.\r\n \r\n #General-Wire","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I calculate the Mean of a sequence","role":"user"},{"content":"\r\n [1.0 2.0 3.0 4.0 5.0 6.0]\r\n Math.Mean\r\n Log(\"result\")\r\n \r\n [1.0 2.0 3.0 4.0 5.0 6.0]\r\n Math.Mean\r\n Log(\"result\")\r\n \r\n Math.Mean is a Maths Shard that will calculate the Mean of a floating point sequence.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get the absolute value of a signed variable?","role":"user"},{"content":"\r\n -3\r\n Math.Abs\r\n Log(\"reseult\") ;; result will be 3\r\n \r\n -3\r\n Math.Abs\r\n Log(\"reseult\") ;; result will be 3\r\n \r\n Math.Abs is a Maths Shard which takes in a signed numeric value as input and return its absolute value. If a sequence is given as input,\r\n Math.Abs will parse through the sequence and return a sequence of absolute values.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I add two values together?","role":"user"},{"content":"\r\n 3 | Math.Add(2)\r\n Log(\"Result\") ;; the result will be 5\r\n \r\n 3 | Math.Add(Operand:2)\r\n Log(Prefix:\"Result\") ;; the result will be 5\r\n \r\n Math.Add is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the addition \r\n mathmatical operation. Math.Add can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario\r\n it will add the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function.\r\n Unlike Math.Inc which is a unary operation, Math.Add is a binary operation.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I apply the cosine trigonometric function to a value","role":"user"},{"content":"\r\n 3.1415927\r\n Math.Cos\r\n Log(\"result\")\r\n \r\n 3.1415927\r\n Math.Cos\r\n Log(Prefix:\"result\")\r\n \r\n Math.Cos is a Maths Shard that will apply the cosine trigonometric function to the float value passed in as input.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I decrease the value of a mutable variable?","role":"user"},{"content":"\r\n 10 >= mutable-var\r\n\r\n 1\r\n Math.Dec(mutable-var)\r\n\r\n mutable-var\r\n Log(\"result\")\r\n \r\n 10 | Set(Name: mutable-var) \r\n\r\n 1\r\n Math.Dec(Value: mutable-var)\r\n\r\n Get(mutable-var)\r\n Log(\"result\")\r\n \r\n Math.Dec is a Maths Shard that will take a in inputs with numeric value and decrease the mutable variable passed into Value parameter by said amount.\r\n Unlike Math.Subtract which is a binary operation, Math. Dec is a unary operation.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert degrees to radians?","role":"user"},{"content":"\r\n 90.0\r\n Math.DegreesToRadians\r\n Log(\"result\")\r\n \r\n 90.0\r\n Math.DegreesToRadians\r\n Log(\"result\")\r\n \r\n Math.DegreesToRadians takes in an angle as degrees and converts it into radians.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I divide two values together?","role":"user"},{"content":"\r\n @wire(wire{\r\n 6.0 | Math.Divide(2.0)\r\n Log(\"Result\") ;; the result will be 3.0\r\n })\r\n \r\n 6.0 | Math.Divide(Operand:2.0)\r\n Log(Prefix:\"Result\") ;; the result will be 3.0\r\n \r\n Math.Divide is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the division\r\n mathmatical operation. Math.Divide can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario\r\n it will divide the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I round down a float to the lowest integer.","role":"user"},{"content":"\r\n 2.7\r\n Math.Floor\r\n Log(\"result\") ;; result will be 2\r\n \r\n 2.7\r\n Math.Floor\r\n Log(\"result\") ;; result will be 2\r\n \r\n Math.Floor is a Maths Shard that takes a float or a sequence of floats and rounds it down to the nearest integer. Unlike Math.Round which will\r\n round a floating-point number to the nearest integer, Math.Floor will round a floating-point number down to the nearest integer that is less than \r\n or equal to it. \r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I increase the value of a mutable variable?","role":"user"},{"content":"\r\n 0 >= mutable-var\r\n\r\n 1\r\n Math.inc(mutable-var)\r\n\r\n mutable-var\r\n Log(\"result\")\r\n \r\n 0 | Set(Name: mutable-var) \r\n\r\n 1\r\n Math.inc(Value: mutable-var)\r\n\r\n Get(mutable-var)\r\n Log(\"result\")\r\n \r\n Math.Inc is a Maths Shard that will take a in inputs with numeric value and increase the mutable variable passed into Value parameter by said amount.\r\n Unlike Math.Add which is a binary operation, Math. Inc is a unary operation.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I calculate the magnitude or length of a vector?","role":"user"},{"content":"\r\n @f2(2.0 3.0)\r\n Math.Length\r\n Log(\"result\") ;; result will be 3.60555\r\n \r\n @f2(2.0 3.0)\r\n Math.Length\r\n Log(PRefix: \"result\") ;; result will be 3.60555\r\n \r\n The Math.Length Shard is a Maths Shard that takes a vector as input and returns the vector's magnitude/length calculated using Pythagorean theorem.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get the swuared length/magnitude of a vector","role":"user"},{"content":"\r\n @f2(2.0 3.0)\r\n Math.Length\r\n Log(\"result\") ;; result will be 13\r\n \r\n @f2(2.0 3.0)\r\n Math.Length\r\n Log(PRefix: \"result\") ;; result will be 13\r\n \r\n The Math.LengthSquared Shard is a Maths Shard that takes a vector as input and returns the vector's squared magnitude/length calculated using Pythagorean theorem.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I linearly interpolate between two values.","role":"user"},{"content":"\r\n 0 = x\r\n \r\n 0.01 ;; interpolation factor\r\n Math.Lerp(x 100)\r\n > x\r\n\r\n x\r\n Log(\"value\")\r\n \r\n 0 = x\r\n \r\n 0.01 ;; interpolation factor\r\n Math.Lerp(First:x Second:100)\r\n > x\r\n\r\n x\r\n Log(Prefix:\"value\")\r\n \r\n Math.Lerp is a Maths Shard which takes the interpolation factor as input and will lineraly interpolate between the the value in the First parameter to\r\n the value in the Second Paramter.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get the natural logarithm of a number?","role":"user"},{"content":"\r\n 7.38906\r\n Math.Log\r\n Log(\"result\") ;; result is 2\r\n \r\n 7.38906\r\n Math.Log\r\n Log(Prefix:\"result\") ;; result is 2\r\n \r\n The Math.Log Shard is a Maths Shard that will take a floating point value and return that value's natrual logarithm to the base of e.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I do matrix multiplication.","role":"user"},{"content":"\r\n tsl-mat | Math.MatMul(rot-mat) | Math.MatMul(scl-mat) = transform-matrix\r\n \r\n tsl-mat | Math.MatMul(Operand:rot-mat) | Math.MatMul(Operand:scl-mat) = transform-matrix\r\n \r\n Math.Rotation is a Maths Shard that does matrix multiplication on the input matrix and the matrix provided in the operand parameter. It can be used\r\n for example to generate the transformation matrix of an object from its translation, rotation and scale matrices.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I calculate the Mean of a sequence","role":"user"},{"content":"\r\n [1.0 2.0 3.0 4.0 5.0 6.0]\r\n Math.Mean\r\n Log(\"result\")\r\n \r\n [1.0 2.0 3.0 4.0 5.0 6.0]\r\n Math.Mean\r\n Log(\"result\")\r\n \r\n Math.Mean is a Maths Shard that will calculate the Mean of a floating point sequence.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I multiply two values together?","role":"user"},{"content":"\r\n @wire(wire{\r\n 3 | Math.Multiply(2)\r\n Log(\"Result\") ;; the result will be 6\r\n })\r\n \r\n 3 | Math.Multiply(Operand:2)\r\n Log(Prefix:\"Result\") ;; the result will be 6\r\n \r\n Math.Multiply is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the multiply\r\n mathmatical operation. Math.Multiply can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario\r\n it will Multiply the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I convert radians to degrees?","role":"user"},{"content":"\r\n 1.5708\r\n Math.DegreesToRadians\r\n Log(\"result\")\r\n \r\n 1.5708\r\n Math.DegreesToRadians\r\n Log(\"result\")\r\n \r\n Math.RadiansToDegrees takes in an angle as radians and converts it into degrees.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a rotation matrix","role":"user"},{"content":"\r\n @f4(1.0 1.0 1.0 0.0)\r\n Math.Rotation\r\n Log(\"result\")\r\n \r\n @f4(1.0 1.0 1.0 0.0)\r\n Math.Rotation\r\n Log(\"result\")\r\n \r\n Math.Rotation is a Maths Shard that takes a float4 input which represents the object's quaternion rotation and converts it into\r\n a rotation matrix.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I round a float to the nearest integer?","role":"user"},{"content":"\r\n 3.6\r\n Math.Round\r\n Log(\"Result\") ;; the result will be 4\r\n \r\n 3.6\r\n Math.Round\r\n Log(\"Result\") ;; the result will be 4\r\n \r\n Math.Round is a Maths Shard which will take a float or a sequence of float and round the values to the nearest integer.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a scale matrix","role":"user"},{"content":"\r\n @f3(1.0 1.0 1.0)\r\n Math.Scaling\r\n Log(\"result\")\r\n \r\n @f3(1.0 1.0 1.0)\r\n Math.Scaling\r\n Log(\"result\")\r\n \r\n Math.Scaling is a Maths Shard that takes a float3 as input and converts it into a scale matrix. \r\n The first value in the float 3 represents the x scale, the second value the y scale and the third value the z scale.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I apply the sine trigonometric function to a value","role":"user"},{"content":"\r\n 1.5708\r\n Math.Sin\r\n Log(\"result\")\r\n \r\n 1.5708\r\n Math.Sin\r\n Log(Prefix:\"result\")\r\n \r\n Math.Sin is a Maths Shard that will apply the sine trigonometric function to the float value passed in as input.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I get the square root of a number","role":"user"},{"content":"\r\n 4.0\r\n Math.Sqrt\r\n Log(\"result\") ;; result is 2.0\r\n \r\n 4.0\r\n Math.Log\r\n Log(Prefix:\"result\") ;; result is 2.0\r\n \r\n The Math.Sqrt Shard is a Maths Shard that takes a floating point value or a sequence of floating point values and returns theri square root.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I subtract two values together?","role":"user"},{"content":"\r\n 3 | Math.Subtract(2)\r\n Log(\"Result\") ;; the result will be 1\r\n \r\n 3 | Math.Subtract(Operand:2)\r\n Log(Prefix:\"Result\") ;; the result will be 1\r\n \r\n Math.Subtract is a Maths Shard which will take a numeric value as input and a value specified on in the Operand paramater and perform the subtract\r\n mathmatical operation. Math.Subtract can also take in a sequence of floats or integers as input and as a value for the Operand parameter. In this scenario\r\n it will subtract the values of each corresponding index and return a sequence. Both the input and the operand needs to be of the same type for the Shard to function.\r\n Unlike Math.Dec which is a unary operation, Math.Subtract is a binary.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I apply the tangent trigonometric function to a value","role":"user"},{"content":"\r\n 0.785398\r\n Math.Tan\r\n Log(\"result\")\r\n \r\n 0.785398\r\n Math.Tan\r\n Log(Prefix:\"result\")\r\n \r\n Math.Tan is a Maths Shard that will apply the tanget trigonometric function to the float value passed in as input.\r\n #Maths","role":"assistant"}]} +{"messages":[{"content":"placeholder-system-prompt","role":"system"},{"content":"How do I create a rotation matrix","role":"user"},{"content":"\r\n @f3(1.0 1.0 1.0)\r\n Math.Translation\r\n Log(\"result\")\r\n \r\n @f3(1.0 1.0 1.0)\r\n Math.Translation\r\n Log(\"result\")\r\n \r\n Math.Translation is a Maths Shard that takes a float3 input and converts it into a rotation matrix. \r\n The first value in the float 3 represents the x translation, the second value the y translation and the third value the z translation.\r\n #Maths","role":"assistant"}]} diff --git a/scripts/test-code.shs b/scripts/test-code.shs new file mode 100644 index 0000000000..8ca5e6ae7b --- /dev/null +++ b/scripts/test-code.shs @@ -0,0 +1,12 @@ + +@wire(main-wire{ + +"5" +ToColor +Log("result") + +}Looped: false) + +@mesh(main) +@schedule(main main-wire) +@run(main) \ No newline at end of file diff --git a/scripts/test.json b/scripts/test.json new file mode 100644 index 0000000000..8995436d3b Binary files /dev/null and b/scripts/test.json differ