From 97d1efae1e5acb3d39a6803eb3138812fe2ad91b Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Fri, 27 Oct 2023 09:01:37 -0400 Subject: cmd/tokenize: nuke failed experiment Signed-off-by: Xe Iaso --- README.md | 1 + cmd/tokenize/main.go | 50 -------------------------------------------------- go.mod | 2 -- go.sum | 4 ---- gomod2nix.toml | 6 ------ 5 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 cmd/tokenize/main.go diff --git a/README.md b/README.md index 61a7550..5a03a59 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # x + Various experimental things diff --git a/cmd/tokenize/main.go b/cmd/tokenize/main.go deleted file mode 100644 index 4e0db40..0000000 --- a/cmd/tokenize/main.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - "encoding/json" - "flag" - "fmt" - "io" - "log" - "os" - - gpt3encoder "github.com/samber/go-gpt-3-encoder" - "within.website/x/internal" -) - -var ( - decode = flag.Bool("decode", false, "if true, decode instead of encode") -) - -func main() { - internal.HandleStartup() - - enc, err := gpt3encoder.NewEncoder() - if err != nil { - log.Fatal(err) - } - - if *decode { - var tokens []int - if err := json.NewDecoder(os.Stdin).Decode(&tokens); err != nil { - log.Fatal(err) - } - - fmt.Fprintln(os.Stdout, enc.Decode(tokens)) - return - } - - data, err := io.ReadAll(os.Stdin) - if err != nil { - log.Fatal(err) - } - - tokens, err := enc.Encode(string(data)) - if err != nil { - log.Fatal(err) - } - - if err := json.NewEncoder(os.Stdout).Encode(&tokens); err != nil { - log.Fatal(err) - } -} diff --git a/go.mod b/go.mod index a37970a..92df9bf 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,6 @@ require ( github.com/rodaine/table v1.1.0 github.com/rogpeppe/go-internal v1.11.0 github.com/rs/cors v1.10.1 - github.com/samber/go-gpt-3-encoder v0.3.1 github.com/sebest/xff v0.0.0-20210106013422-671bd2870b3a github.com/tetratelabs/wazero v1.5.0 github.com/thoj/go-ircevent v0.0.0-20210723090443-73e444401d64 @@ -153,7 +152,6 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/sacOO7/go-logger v0.0.0-20180719173527-9ac9add5a50d // indirect github.com/sacOO7/gowebsocket v0.0.0-20221109081133-70ac927be105 - github.com/samber/lo v1.37.0 // indirect github.com/sendgrid/rest v2.6.9+incompatible // indirect github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect github.com/tailscale/certstore v0.1.1-0.20220316223106-78d6e1c49d8d // indirect diff --git a/go.sum b/go.sum index 9352a5e..9946444 100644 --- a/go.sum +++ b/go.sum @@ -531,10 +531,6 @@ github.com/sacOO7/go-logger v0.0.0-20180719173527-9ac9add5a50d h1:5T+fbRuQbpi+WZ github.com/sacOO7/go-logger v0.0.0-20180719173527-9ac9add5a50d/go.mod h1:L5EJe2k8GwpBoGXDRLAEs58R239jpZuE7NNEtW+T7oo= github.com/sacOO7/gowebsocket v0.0.0-20221109081133-70ac927be105 h1:WgzGzpeh4gpYaVzpdMlThUp5HK2w+tmX8FiGxyVMLys= github.com/sacOO7/gowebsocket v0.0.0-20221109081133-70ac927be105/go.mod h1:h00QywbM5Le22ESUiI8Yz2/9TVGD8eAz/cAk55Kcz/E= -github.com/samber/go-gpt-3-encoder v0.3.1 h1:YWb9GsGYUgSX/wPtsEHjyNGRQXsQ9vDCg9SU2x9uMeU= -github.com/samber/go-gpt-3-encoder v0.3.1/go.mod h1:27nvdvk9ZtALyNtgs9JsPCMYja0Eleow/XzgjqwRtLU= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee h1:8Iv5m6xEo1NR1AvpV+7XmhI4r39LGNzwUL4YpMuL5vk= github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee/go.mod h1:qwtSXrKuJh/zsFQ12yEE89xfCrGKK63Rr7ctU/uCo4g= github.com/sebest/xff v0.0.0-20210106013422-671bd2870b3a h1:iLcLb5Fwwz7g/DLK89F+uQBDeAhHhwdzB5fSlVdhGcM= diff --git a/gomod2nix.toml b/gomod2nix.toml index 08575d1..6b3a1fd 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -340,12 +340,6 @@ schema = 3 [mod."github.com/sacOO7/gowebsocket"] version = "v0.0.0-20221109081133-70ac927be105" hash = "sha256-N/fc2CbNM66Da+8qFf7PPRGLustXKgLeYfCtVeDG2hs=" - [mod."github.com/samber/go-gpt-3-encoder"] - version = "v0.3.1" - hash = "sha256-quLfn1bazwQer7OBLtzjfN40cE39Q+whsUG4lWa/0p0=" - [mod."github.com/samber/lo"] - version = "v1.37.0" - hash = "sha256-5m0advnk/wy/bFygNyxaPVX2PgA5oF1lSHP71hAOhCc=" [mod."github.com/savsgio/gotils"] version = "v0.0.0-20230208104028-c358bd845dee" hash = "sha256-38uPEruTtVRqleBivVwx6oO1FSx4edqEujYdZNTriMo=" -- cgit v1.2.3