mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-09 16:24:38 +00:00
(chore) util: remove_model_id
This commit is contained in:
+10
-1
@@ -5846,4 +5846,13 @@ def transform_logprobs(hf_response):
|
||||
# Add the 'token_info' list to the 'transformed_logprobs' list
|
||||
transformed_logprobs = token_info
|
||||
|
||||
return transformed_logprobs
|
||||
return transformed_logprobs
|
||||
|
||||
# used in LiteLLM Router
|
||||
def remove_model_id(original_model_string):
|
||||
# Find the index of "ModelID" in the string
|
||||
index_of_model_id = original_model_string.find("-ModelID")
|
||||
# Remove everything after "-ModelID" if it exists
|
||||
if index_of_model_id != -1:
|
||||
return original_model_string[:index_of_model_id]
|
||||
return original_model_string
|
||||
Reference in New Issue
Block a user