From eafe2ce1db50dcd78b3b7157bf2c669109f4e322 Mon Sep 17 00:00:00 2001 From: Daulet Zhanguzin Date: Fri, 9 Aug 2024 16:52:45 -0700 Subject: [PATCH] fix: update example to latest release --- example/README.md | 8 ++++++++ example/go.mod | 4 ++-- example/go.sum | 4 ++-- example/main.go | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 example/README.md diff --git a/example/README.md b/example/README.md new file mode 100644 index 00000000..8dfec5a4 --- /dev/null +++ b/example/README.md @@ -0,0 +1,8 @@ +# Example + +``` +# Keep this version in sync with go module release +curl -fsSL https://github.com/daulet/tokenizers/releases/download/v0.9.0/libtokenizers.darwin-aarch64.tar.gz | tar xvz +# change -L argument to where you've placed the library download above +go run -ldflags="-extldflags '-L$(pwd)'" main.go +``` \ No newline at end of file diff --git a/example/go.mod b/example/go.mod index 59136025..7023aa34 100644 --- a/example/go.mod +++ b/example/go.mod @@ -1,5 +1,5 @@ module github.com/daulet/tokenizers/example -go 1.21 +go 1.22 -require github.com/daulet/tokenizers v0.6.0 +require github.com/daulet/tokenizers v0.9.0 diff --git a/example/go.sum b/example/go.sum index a5b65724..81993142 100644 --- a/example/go.sum +++ b/example/go.sum @@ -1,5 +1,5 @@ -github.com/daulet/tokenizers v0.6.0 h1:y6cSPx5YMrXy9dkt7NGWY1l64iwOpD0YU4j6P1Gwqo8= -github.com/daulet/tokenizers v0.6.0/go.mod h1:tGnMdZthXdcWY6DGD07IygpwJqiPvG85FQUnhs/wSCs= +github.com/daulet/tokenizers v0.9.0 h1:PSjFUGeuhqb3C0GKP9hdvtHvJ6L1AZceV+0nYGACtCk= +github.com/daulet/tokenizers v0.9.0/go.mod h1:tGnMdZthXdcWY6DGD07IygpwJqiPvG85FQUnhs/wSCs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/example/main.go b/example/main.go index 0436e51d..43d07830 100644 --- a/example/main.go +++ b/example/main.go @@ -7,7 +7,7 @@ import ( ) func main() { - tk, err := tokenizers.FromFile("./test/data/bert-base-uncased.json") + tk, err := tokenizers.FromFile("../test/data/bert-base-uncased.json") if err != nil { panic(err) }