remove nip90 because it is broken.
This commit is contained in:
1
nip90/.gitignore
vendored
1
nip90/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
data-vending-machines
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
generate: dvm_repo
|
|
||||||
#!/usr/bin/env fish
|
|
||||||
echo 'package nip90
|
|
||||||
|
|
||||||
type Job struct {
|
|
||||||
InputKind int
|
|
||||||
OutputKind int
|
|
||||||
Name string
|
|
||||||
Description string
|
|
||||||
InputType string
|
|
||||||
Params []string
|
|
||||||
}
|
|
||||||
' > kinds.go
|
|
||||||
for kindf in (ls data-vending-machines/kinds)
|
|
||||||
echo "> $kindf"
|
|
||||||
set file "data-vending-machines/kinds/$kindf"
|
|
||||||
|
|
||||||
set kind (echo $kindf | rg -o '\d+')
|
|
||||||
set okind (echo $kind | jq -r '. + 1000')
|
|
||||||
set title (rg --replace '$1' '^title: *(.*)$' $file | string trim)
|
|
||||||
set desc (rg --replace '$1' '^description: *(.*)$' $file | string trim)
|
|
||||||
set inputtype (rg --replace '$1' '(\[ *"i".*\])[^]]*$' $file | jq -nr 'input // [0, 0, ""] | .[2]')
|
|
||||||
set params (fq '
|
|
||||||
def drill_to_code:
|
|
||||||
if (type == "object" and .children) then
|
|
||||||
.children
|
|
||||||
| map(drill_to_code)
|
|
||||||
else
|
|
||||||
select
|
|
||||||
( (type == "object") and (.type == "code")
|
|
||||||
)
|
|
||||||
| .literal
|
|
||||||
end
|
|
||||||
;
|
|
||||||
|
|
||||||
.children
|
|
||||||
| . as $sections
|
|
||||||
|
|
|
||||||
( $sections
|
|
||||||
| map(.type == "heading" and .children == ["Params"])
|
|
||||||
| index(true)
|
|
||||||
) as $startParams
|
|
||||||
| if $startParams == null
|
|
||||||
then []
|
|
||||||
else
|
|
||||||
( $sections[($startParams + 1):]
|
|
||||||
| map(.type == "heading" and .level == ($sections[$startParams].level))
|
|
||||||
| index(true)
|
|
||||||
| . + $startParams + 1
|
|
||||||
) as $endParams
|
|
||||||
| ( $sections[($startParams + 1):$endParams]
|
|
||||||
| map
|
|
||||||
( .children
|
|
||||||
| select(.)
|
|
||||||
| map(drill_to_code)
|
|
||||||
)
|
|
||||||
| flatten
|
|
||||||
| select(. | length > 1)
|
|
||||||
| unique
|
|
||||||
)
|
|
||||||
end
|
|
||||||
| .[]
|
|
||||||
' -d markdown -r $file
|
|
||||||
)
|
|
||||||
|
|
||||||
echo "var Job$kind = Job{
|
|
||||||
InputKind: $kind,
|
|
||||||
OutputKind: $okind,
|
|
||||||
Name: \"$title\",
|
|
||||||
Description: \"$desc\",
|
|
||||||
InputType: \"$inputtype\",
|
|
||||||
Params: []string{" >> kinds.go
|
|
||||||
|
|
||||||
for param in $params
|
|
||||||
echo "\"$param\"", >> kinds.go
|
|
||||||
end
|
|
||||||
|
|
||||||
echo "},
|
|
||||||
}
|
|
||||||
" >> kinds.go
|
|
||||||
end
|
|
||||||
|
|
||||||
echo "var Jobs = []Job{" >> kinds.go
|
|
||||||
for kindf in (ls data-vending-machines/kinds)
|
|
||||||
set kind (echo $kindf | rg -o '\d+')
|
|
||||||
echo "Job$kind," >> kinds.go
|
|
||||||
end
|
|
||||||
echo "}" >> kinds.go
|
|
||||||
|
|
||||||
go fmt kinds.go
|
|
||||||
|
|
||||||
dvm_repo:
|
|
||||||
#!/usr/bin/env fish
|
|
||||||
if [ ! -d data-vending-machines ]
|
|
||||||
git clone https://github.com/nostr-protocol/data-vending-machines.git
|
|
||||||
end
|
|
||||||
cd data-vending-machines
|
|
||||||
git reset --hard HEAD
|
|
||||||
git pull
|
|
||||||
246
nip90/kinds.go
246
nip90/kinds.go
@@ -1,246 +0,0 @@
|
|||||||
package nip90
|
|
||||||
|
|
||||||
type Job struct {
|
|
||||||
InputKind int
|
|
||||||
OutputKind int
|
|
||||||
Name string
|
|
||||||
Description string
|
|
||||||
InputType string
|
|
||||||
Params []string
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5000 = Job{
|
|
||||||
InputKind: 5000,
|
|
||||||
OutputKind: 6000,
|
|
||||||
Name: "Text extraction",
|
|
||||||
Description: "Job request to extract text from some kind of input.",
|
|
||||||
InputType: "url",
|
|
||||||
Params: []string{
|
|
||||||
"alignment",
|
|
||||||
"range",
|
|
||||||
"raw",
|
|
||||||
"segment",
|
|
||||||
"word",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5001 = Job{
|
|
||||||
InputKind: 5001,
|
|
||||||
OutputKind: 6001,
|
|
||||||
Name: "Summarization",
|
|
||||||
Description: "Summarize input(s)",
|
|
||||||
InputType: "event",
|
|
||||||
Params: []string{
|
|
||||||
"length",
|
|
||||||
"paragraphs",
|
|
||||||
"words",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5002 = Job{
|
|
||||||
InputKind: 5002,
|
|
||||||
OutputKind: 6002,
|
|
||||||
Name: "Translation",
|
|
||||||
Description: "Translate input(s)",
|
|
||||||
InputType: "event",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5050 = Job{
|
|
||||||
InputKind: 5050,
|
|
||||||
OutputKind: 6050,
|
|
||||||
Name: "Text Generation",
|
|
||||||
Description: "Job request to generate text using AI models.",
|
|
||||||
InputType: "prompt",
|
|
||||||
Params: []string{
|
|
||||||
"frequency_penalty",
|
|
||||||
"max_tokens",
|
|
||||||
"model",
|
|
||||||
"temperature",
|
|
||||||
"top_k",
|
|
||||||
"top_p",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5100 = Job{
|
|
||||||
InputKind: 5100,
|
|
||||||
OutputKind: 6100,
|
|
||||||
Name: "Image Generation",
|
|
||||||
Description: "Job request to generate Images using AI models.",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{
|
|
||||||
"${width}x${height}",
|
|
||||||
"1024x768",
|
|
||||||
"512x512",
|
|
||||||
"lora",
|
|
||||||
"model",
|
|
||||||
"negative_prompt",
|
|
||||||
"ratio",
|
|
||||||
"size",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5200 = Job{
|
|
||||||
InputKind: 5200,
|
|
||||||
OutputKind: 6200,
|
|
||||||
Name: "Video Conversion",
|
|
||||||
Description: "Job request to convert a Video to another Format.",
|
|
||||||
InputType: "url",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5201 = Job{
|
|
||||||
InputKind: 5201,
|
|
||||||
OutputKind: 6201,
|
|
||||||
Name: "Video Translation",
|
|
||||||
Description: "Job request to translate video audio content into target language with or without subtitles.",
|
|
||||||
InputType: "url",
|
|
||||||
Params: []string{
|
|
||||||
"format",
|
|
||||||
"language",
|
|
||||||
"range",
|
|
||||||
"subtitle",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5202 = Job{
|
|
||||||
InputKind: 5202,
|
|
||||||
OutputKind: 6202,
|
|
||||||
Name: "Image-to-Video Conversion",
|
|
||||||
Description: "Job request to convert a static Image to a a short animated video clip",
|
|
||||||
InputType: "url",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5250 = Job{
|
|
||||||
InputKind: 5250,
|
|
||||||
OutputKind: 6250,
|
|
||||||
Name: "Text-to-Speech Generation",
|
|
||||||
Description: "Job request to convert text input to an audio file.",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5300 = Job{
|
|
||||||
InputKind: 5300,
|
|
||||||
OutputKind: 6300,
|
|
||||||
Name: "Nostr Content Discovery",
|
|
||||||
Description: "Job request to discover nostr-native content",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5301 = Job{
|
|
||||||
InputKind: 5301,
|
|
||||||
OutputKind: 6301,
|
|
||||||
Name: "Nostr People Discovery",
|
|
||||||
Description: "Job request to discover nostr pubkeys",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5302 = Job{
|
|
||||||
InputKind: 5302,
|
|
||||||
OutputKind: 6302,
|
|
||||||
Name: "Nostr Content Search",
|
|
||||||
Description: "Job to search for notes based on a prompt",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{
|
|
||||||
"max_results",
|
|
||||||
"since",
|
|
||||||
"until",
|
|
||||||
"users",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5303 = Job{
|
|
||||||
InputKind: 5303,
|
|
||||||
OutputKind: 6303,
|
|
||||||
Name: "Nostr People Search",
|
|
||||||
Description: "Job to search for profiles based on a prompt",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5400 = Job{
|
|
||||||
InputKind: 5400,
|
|
||||||
OutputKind: 6400,
|
|
||||||
Name: "Nostr Event Count",
|
|
||||||
Description: "Job request to count matching events",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{
|
|
||||||
"content",
|
|
||||||
"group",
|
|
||||||
"pubkey",
|
|
||||||
"relay",
|
|
||||||
"reply",
|
|
||||||
"root",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5500 = Job{
|
|
||||||
InputKind: 5500,
|
|
||||||
OutputKind: 6500,
|
|
||||||
Name: "Malware Scanning",
|
|
||||||
Description: "Job request to perform a Malware Scan on files.",
|
|
||||||
InputType: "",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5900 = Job{
|
|
||||||
InputKind: 5900,
|
|
||||||
OutputKind: 6900,
|
|
||||||
Name: "Nostr Event Time Stamping",
|
|
||||||
Description: "NIP-03 Timestamping of nostr events",
|
|
||||||
InputType: "event",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5901 = Job{
|
|
||||||
InputKind: 5901,
|
|
||||||
OutputKind: 6901,
|
|
||||||
Name: "OP_RETURN Creation",
|
|
||||||
Description: "Create a bitcoin transaction with an OP_RETURN",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5905 = Job{
|
|
||||||
InputKind: 5905,
|
|
||||||
OutputKind: 6905,
|
|
||||||
Name: "Nostr Event Publish Schedule",
|
|
||||||
Description: "Schedule nostr events for future publishing",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Job5970 = Job{
|
|
||||||
InputKind: 5970,
|
|
||||||
OutputKind: 6970,
|
|
||||||
Name: "Event PoW Delegation",
|
|
||||||
Description: "Delegate PoW of an event to a provider.",
|
|
||||||
InputType: "text",
|
|
||||||
Params: []string{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var Jobs = []Job{
|
|
||||||
Job5000,
|
|
||||||
Job5001,
|
|
||||||
Job5002,
|
|
||||||
Job5050,
|
|
||||||
Job5100,
|
|
||||||
Job5200,
|
|
||||||
Job5201,
|
|
||||||
Job5202,
|
|
||||||
Job5250,
|
|
||||||
Job5300,
|
|
||||||
Job5301,
|
|
||||||
Job5302,
|
|
||||||
Job5303,
|
|
||||||
Job5400,
|
|
||||||
Job5500,
|
|
||||||
Job5900,
|
|
||||||
Job5901,
|
|
||||||
Job5905,
|
|
||||||
Job5970,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user