Skip to content

Commit

Permalink
fix: selective context args (#105)
Browse files Browse the repository at this point in the history
fix: print the original traceback of the exception
  • Loading branch information
kyteinsky authored Nov 20, 2024
2 parents b491b60 + 22bf3c8 commit 21df2d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions context_chat_backend/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ def execute_query(query: Query, in_proc: bool = True) -> LLMOutput:
app_config,
query.query,
query.ctxLimit,
template,
end_separator,
query.scopeType,
query.scopeList,
template,
end_separator,
)
else:
target=process_query
Expand Down
4 changes: 2 additions & 2 deletions context_chat_backend/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from functools import partial
from logging import error as log_error
from multiprocessing.connection import Connection
from multiprocessing.pool import rebuild_exc # pyright: ignore[reportAttributeAccessIssue]
from os import getenv
from typing import Any, TypeGuard, TypeVar

Expand Down Expand Up @@ -108,6 +107,7 @@ def exec_in_proc(group=None, target=None, name=None, args=(), kwargs={}, *, daem

result = pconn.recv()
if result['error'] is not None:
raise rebuild_exc(result['error'], result['traceback'])
print('original traceback:', result['traceback'], flush=True)
raise result['error']

return result['value']

0 comments on commit 21df2d6

Please sign in to comment.