Skip to content

[BUG] Error happens in reranking process for TeiFastReranking #549

@tknrych

Description

@tknrych

Description

When using TeiFastReranking as the reranking method, if a string exceeding the Max Tokens supported by the Reranker Model specified on the TeiFastReranking Server side is passed, the server returns an error. As a result, an error warning would also be displayed on the kotaemon interface. Although the is_truncated option was present in the kotaemon code, no processing was implemented for it. To address this, functionality was added to allow specifying the max_tokens option alongside the is_truncated option. If a string exceeding the specified max_tokens is passed, the string will now be truncated accordingly.

Here is a pull request for just your referece.
https://github.com/Cinnamon/kotaemon/pull/530

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

No response

OS

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions