Fix: the input length exceeds the context length (#10895)

### What problem does this PR solve?

Fix: the input length exceeds the context length #10750

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Billy Bao
2025-10-30 19:00:53 +08:00
committed by GitHub
parent ab52ffc9c0
commit fa38aed01b
2 changed files with 14 additions and 3 deletions

View File

@ -215,7 +215,7 @@ def add_llm():
mdl = EmbeddingModel[factory](
key=llm['api_key'],
model_name=mdl_nm,
base_url=llm["api_base"])
base_url=llm["api_base"])
try:
arr, tc = mdl.encode(["Test if the api key is available"])
if len(arr[0]) == 0: