Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3c130f0

Browse filesBrowse files
author
Mug
committed
Remove try catch from chat
1 parent be2c961 commit 3c130f0
Copy full SHA for 3c130f0

File tree

Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed

‎examples/low_level_api/low_level_api_chat_cpp.py

Copy file name to clipboardExpand all lines: examples/low_level_api/low_level_api_chat_cpp.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,7 @@ def input(self, prompt: str):
356356
def output(self):
357357
self.remaining_tokens = self.params.n_predict
358358
for id in self.generate():
359-
try:
360-
yield llama_cpp.llama_token_to_str(self.ctx, id).decode("utf-8", errors="ignore")
361-
except UnicodeDecodeError:
362-
pass
359+
yield llama_cpp.llama_token_to_str(self.ctx, id).decode("utf-8", errors="ignore")
363360

364361
# read user input
365362
def read_input(self):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.