update vast.nu for new nushell

This commit is contained in:
2025-01-20 22:55:36 -05:00
parent 1e7b981de4
commit fce05072a9
3 changed files with 7 additions and 6 deletions

1
nushell/nu_scripts Submodule

Submodule nushell/nu_scripts added at 1ed7ef9401

View File

@@ -1,8 +1,5 @@
# oof
export def main [] { echo "corn waffle" }
export def "vast api-call get" [
path: string # The path to make the API call to
query?: record # The data to scream at the server with
@@ -135,13 +132,13 @@ export def test [arg: any@"test completion"] { return "ok!" }
def "invokeenv tokens" [] {
mut output = []
if "HUGGINGFACE_TOKEN" in $env {
$output ++= { url_regex: "huggingface.co" token: ($env.HUGGINGFACE_TOKEN) } }
$output = $output | append { url_regex: "huggingface.co" token: $env.HUGGINGFACE_TOKEN } }
if "CIVITAI_TOKEN" in $env {
$output ++= { url_regex: "civitai.com" token: ($env.CIVITAI_TOKEN) } }
$output = $output | append { url_regex: "civitai.com" token: $env.CIVITAI_TOKEN } }
return ($output | to json --raw)
}
export def "invokeenv huggingface" [address: string] {
def "invokeenv huggingface" [address: string] {
let inaddr = ($address | url parse)
let url_template = {
scheme: $inaddr.scheme