Skip to content

Commit

Permalink
docs: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Müller committed Feb 10, 2024
1 parent a591acf commit f2d292d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 57,15 @@ You can install JTokkit by adding the following dependency to your Maven project
<dependency>
<groupId>com.knuddels</groupId>
<artifactId>jtokkit</artifactId>
<version>0.6.1</version>
<version>1.0.0</version>
</dependency>
```

Or alternatively using Gradle:

```groovy
dependencies {
implementation 'com.knuddels:jtokkit:0.6.1'
implementation 'com.knuddels:jtokkit:1.0.0'
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/getting-started/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 31,14 @@ You can install JTokkit by adding the following dependency to your Maven project
<dependency>
<groupId>com.knuddels</groupId>
<artifactId>jtokkit</artifactId>
<version>0.6.1</version>
<version>1.0.0</version>
</dependency>
```

Or alternatively using Gradle:

```groovy
dependencies {
implementation 'com.knuddels:jtokkit:0.6.1'
implementation 'com.knuddels:jtokkit:1.0.0'
}
```
4 changes: 2 additions & 2 deletions docs/docs/getting-started/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 56,7 @@ The encoding is also fully thread-safe and can be used concurrently by multiple

:::info

Note that the library currently does not support encoding of special tokens. Special tokens are artificial tokens used to unlock capabilities from a model, such as fill-in-the-middle. If the `Encoding#encode` method encounters a special token in the input text, it will throw an `UnsupportedOperationException`.
Note that the library does not support encoding of special tokens. Special tokens are artificial tokens used to unlock capabilities from a model, such as fill-in-the-middle. If the `Encoding#encode` method encounters a special token in the input text, it will throw an `UnsupportedOperationException`.

If you want to encode special tokens as if they were normal text, you can use `Encoding#encodeOrdinary` instead:

Expand All @@ -72,7 72,7 @@ encoding.encodeOrdinary("hello <|endoftext|> world");

## Counting tokens

If all you want is the amount of tokens the text encodes to, you can use the shorthand method `Encoding#countTokens` or `Encoding#countTokensOrdinary`:
If all you want is the amount of tokens the text encodes to, you can use the shorthand method `Encoding#countTokens` or `Encoding#countTokensOrdinary`. These methods are faster than the corresponding `encode` methods.

```java
int tokenCount = encoding.countTokens("This is a sample sentence.");
Expand Down

0 comments on commit f2d292d

Please sign in to comment.