Replace detokenize with binary search based truncation#780
Open
sats-23 wants to merge 2 commits into
Open
Conversation
|
|
||
| @retry_on_transient_error(max_retries=3, initial_delay=1.0, backoff_multiplier=2.0) | ||
| def detokenize_with_llm(tokens, emb_endpoint, max_retries=3): | ||
| def truncate_text_to_token_limit(text, token_limit, llm_endpoint): |
Member
There was a problem hiding this comment.
I think this need to be inside misc_utils.py
Do you think it would make sense to use detokenize in method name?
I wanted it to be a generic replacement for detokenize so that in future if there are some other requirement for detokenize, we can make use of this.
| REGISTRY?=icr.io/ai-services-private | ||
| IMAGE=chatbot-service | ||
| TAG?=v0.0.107 | ||
| TAG?=v0.0.108 |
Member
There was a problem hiding this comment.
you can't bump this
first you need to bump common
then in a follow up PR we need to use the updated common version in chatbot service.
I think we have to revisit this part. I feel we need to have different strategy to use common in services.
Signed-off-by: Sathvik <Sathvik.S@ibm.com>
Signed-off-by: Sathvik <Sathvik.S@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.