mirror of
https://github.com/KiTTYsh/dotfiles.git
synced 2026-02-04 00:39:16 -05:00
update vast.nu for new nushell
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "nushell/nu_scripts"]
|
||||||
|
path = nushell/nu_scripts
|
||||||
|
url = https://github.com/nushell/nu_scripts
|
||||||
|
|||||||
1
nushell/nu_scripts
Submodule
1
nushell/nu_scripts
Submodule
Submodule nushell/nu_scripts added at 1ed7ef9401
@@ -1,8 +1,5 @@
|
|||||||
# oof
|
# oof
|
||||||
|
|
||||||
export def main [] { echo "corn waffle" }
|
|
||||||
|
|
||||||
|
|
||||||
export def "vast api-call get" [
|
export def "vast api-call get" [
|
||||||
path: string # The path to make the API call to
|
path: string # The path to make the API call to
|
||||||
query?: record # The data to scream at the server with
|
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" [] {
|
def "invokeenv tokens" [] {
|
||||||
mut output = []
|
mut output = []
|
||||||
if "HUGGINGFACE_TOKEN" in $env {
|
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 {
|
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)
|
return ($output | to json --raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
export def "invokeenv huggingface" [address: string] {
|
def "invokeenv huggingface" [address: string] {
|
||||||
let inaddr = ($address | url parse)
|
let inaddr = ($address | url parse)
|
||||||
let url_template = {
|
let url_template = {
|
||||||
scheme: $inaddr.scheme
|
scheme: $inaddr.scheme
|
||||||
|
|||||||
Reference in New Issue
Block a user