Tools:
- zoom(id, n) opens line id+n into the two lines it was made from;
- zoom(id, 1) gives message id whole
+- zoom("Name") gives an agent's whole chat
- date(id) gives the date and time of message id
# Turns
{
Type: "function",
Name: "zoom",
- Description: "Open the line id+n of the view into the two lines of n/2 under it; n = 1 gives the message whole.",
+ Description: "Open the line id+n of the view into the two lines of n/2 under it; n = 1 gives the message whole. With an agent's name, give that agent's whole chat.",
Parameters: promptObjectSchema(map[string]any{
- "id": promptIntegerSchema("The first message of the line: a multiple of n."),
- "n": promptIntegerSchema("The number of messages of the line: a power of 2."),
+ "id": promptIntegerSchema("The first message of the line: a multiple of n."),
+ "n": promptIntegerSchema("The number of messages of the line: a power of 2."),
+ "name": promptNullableStringSchema("The name of an agent whose whole chat to give, or null for the line id+n."),
}),
Strict: true,
},
}
}
+// promptNullableStringSchema returns the JSON schema of a string or null.
+func promptNullableStringSchema(description string) map[string]any {
+ return map[string]any{
+ "type": []string{"string", "null"},
+ "description": description,
+ }
+}
+
// promptStringSchema returns the JSON schema of a string.
func promptStringSchema(description string) map[string]any {
return map[string]any{