fix decoding error. adds errors=ignore parameter
This commit is contained in:
parent
bc9e84daca
commit
5f6b715071
1 changed files with 1 additions and 1 deletions
|
@ -151,7 +151,7 @@ def llama_get_embeddings(ctx: llama_context_p):
|
|||
|
||||
def llama_token_to_str(ctx: llama_context_p, token: int) -> str:
|
||||
"""Token Id -> String. Uses the vocabulary in the provided context"""
|
||||
return lib.llama_token_to_str(ctx, token).decode('utf-8')
|
||||
return lib.llama_token_to_str(ctx, token).decode('utf-8', errors='ignore')
|
||||
|
||||
def llama_token_bos() -> llama_token:
|
||||
return lib.llama_token_bos()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue