Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
c13b9d87
Unverified
Commit
c13b9d87
authored
Apr 17, 2023
by
OlivierDehaene
Committed by
GitHub
Apr 17, 2023
Browse files
fix(router): fix truncation (#190)
closes #189
parent
7a1ba585
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
router/src/validation.rs
router/src/validation.rs
+2
-2
No files found.
router/src/validation.rs
View file @
c13b9d87
...
...
@@ -308,8 +308,8 @@ fn prepare_input(
// Optionally truncate
let
(
inputs
,
input_length
)
=
match
truncate
{
// Truncate is some and
>
encoding length
Some
(
truncate
)
if
truncate
>
encoding
.len
()
=>
{
// Truncate is some and
<
encoding length
Some
(
truncate
)
if
truncate
<
encoding
.len
()
=>
{
// truncate encoding and decode new inputs
encoding
.truncate
(
truncate
,
0
,
TruncationDirection
::
Left
);
let
inputs
=
tokenizer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment