Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First draft of AI Query Cards #871

Open
wants to merge 16 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ai/fine-tuning-v1/general-wires/detach_query.shs
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

can be detached at any point in time. Subsequent detaches of the same wire, will be ignored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless restart parameter is specified, also the whole one wire of each unique wire I'm not sure

"""

tag: " #General-Wire"
}
25 changes: 25 additions & 0 deletions ai/fine-tuning-v1/general-wires/doMany_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
23 changes: 23 additions & 0 deletions ai/fine-tuning-v1/general-wires/do_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
22 changes: 22 additions & 0 deletions ai/fine-tuning-v1/general-wires/pause_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
21 changes: 21 additions & 0 deletions ai/fine-tuning-v1/general-wires/restart_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
21 changes: 21 additions & 0 deletions ai/fine-tuning-v1/general-wires/resume_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
21 changes: 21 additions & 0 deletions ai/fine-tuning-v1/general-wires/spawn_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
27 changes: 27 additions & 0 deletions ai/fine-tuning-v1/general-wires/stepMany_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
25 changes: 25 additions & 0 deletions ai/fine-tuning-v1/general-wires/step_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
23 changes: 23 additions & 0 deletions ai/fine-tuning-v1/general-wires/stop_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
22 changes: 22 additions & 0 deletions ai/fine-tuning-v1/general-wires/suspend_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
23 changes: 23 additions & 0 deletions ai/fine-tuning-v1/general-wires/switchto_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
19 changes: 19 additions & 0 deletions ai/fine-tuning-v1/general/FromBase58_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
19 changes: 19 additions & 0 deletions ai/fine-tuning-v1/general/FromBase64_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
29 changes: 29 additions & 0 deletions ai/fine-tuning-v1/general/Table_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
21 changes: 21 additions & 0 deletions ai/fine-tuning-v1/general/ToBase58_query.shs
Original file line number Diff line number Diff line change
@@ -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"
}
Loading
Loading