bohr-agent-sdk 0.1.123__py3-none-any.whl → 0.1.124__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bohr-agent-sdk
3
- Version: 0.1.123
3
+ Version: 0.1.124
4
4
  Summary: SDK for scientific agents
5
5
  Home-page: https://github.com/dptech-corp/bohr-agent-sdk/
6
6
  Author: DP Technology
@@ -66,7 +66,7 @@ dp/agent/server/calculation_mcp_server.py,sha256=z4tzhT2hMN9HRiTp0cg2AwYuqlz146S
66
66
  dp/agent/server/preprocessor.py,sha256=XUWu7QOwo_sIDMYS2b1OTrM33EXEVH_73vk-ju1Ok8A,1264
67
67
  dp/agent/server/utils.py,sha256=cIKaAg8UaP5yMwvIVTgUVBjy-B3S16bEdnucUf4UDIM,2055
68
68
  dp/agent/server/executor/__init__.py,sha256=s95M5qKQk39Yi9qaVJZhk_nfj54quSf7EDghR3OCFUA,248
69
- dp/agent/server/executor/base_executor.py,sha256=nR2jI-wFvKoOk8QaK11pnSAkHj2MsE6uyzPWDx-vgJA,3018
69
+ dp/agent/server/executor/base_executor.py,sha256=4ATEODR18GRfNmup8TaQrqPlTney94UuHrfGMNq07gg,3169
70
70
  dp/agent/server/executor/dispatcher_executor.py,sha256=LA79QIsTu6YY60mkn6o4iW1VWRqpAcJHQhKMENKPN1c,12643
71
71
  dp/agent/server/executor/local_executor.py,sha256=qRVnfqhvaCGBXr-NO4uxcUteFja2BE_6NXauVJ8vnoo,6642
72
72
  dp/agent/server/storage/__init__.py,sha256=Sgsyp5hb0_hhIGugAPfQFzBHt_854rS_MuMuE3sn8Gs,389
@@ -75,8 +75,8 @@ dp/agent/server/storage/bohrium_storage.py,sha256=EsKX4dWWvZTn2TEhZv4zsvihfDK0mm
75
75
  dp/agent/server/storage/http_storage.py,sha256=KiySq7g9-iJr12XQCKKyJLn8wJoDnSRpQAR5_qPJ1ZU,1471
76
76
  dp/agent/server/storage/local_storage.py,sha256=t1wfjByjXew9ws3PuUxWxmZQ0-Wt1a6t4wmj3fW62GI,1352
77
77
  dp/agent/server/storage/oss_storage.py,sha256=pgjmi7Gir3Y5wkMDCvU4fvSls15fXT7Ax-h9MYHFPK0,3359
78
- bohr_agent_sdk-0.1.123.dist-info/METADATA,sha256=5ptmdilTXVCoFGsYIAplF1uiG7vn9gwHaBX4xpS2sks,11070
79
- bohr_agent_sdk-0.1.123.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
80
- bohr_agent_sdk-0.1.123.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
81
- bohr_agent_sdk-0.1.123.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
82
- bohr_agent_sdk-0.1.123.dist-info/RECORD,,
78
+ bohr_agent_sdk-0.1.124.dist-info/METADATA,sha256=AXVjb3W9qiujh4TETmfktu0iHLMG-roMsKmZKC-E60A,11070
79
+ bohr_agent_sdk-0.1.124.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
80
+ bohr_agent_sdk-0.1.124.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
81
+ bohr_agent_sdk-0.1.124.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
82
+ bohr_agent_sdk-0.1.124.dist-info/RECORD,,
@@ -32,20 +32,23 @@ class BaseExecutor(ABC):
32
32
  def prune_context(self, kwargs: dict):
33
33
  for key, value in kwargs.items():
34
34
  if isinstance(value, Context):
35
- context = Context(request_context=RequestContext(
36
- request_id=value.request_context.request_id,
37
- meta=value.request_context.meta,
38
- session=None,
39
- lifespan_context=value.request_context.lifespan_context,
40
- request=Request(
41
- scope={
42
- k: v for k, v in
43
- value.request_context.request.scope.items()
44
- if k not in ["app", "router", "endpoint",
45
- "starlette.exception_handlers"]
46
- },
47
- )
48
- ))
35
+ try:
36
+ context = Context(request_context=RequestContext(
37
+ request_id=value.request_context.request_id,
38
+ meta=value.request_context.meta,
39
+ session=None,
40
+ lifespan_context=value.request_context.lifespan_context,
41
+ request=Request(
42
+ scope={
43
+ k: v for k, v in
44
+ value.request_context.request.scope.items()
45
+ if k not in ["app", "router", "endpoint",
46
+ "starlette.exception_handlers"]
47
+ },
48
+ )
49
+ ))
50
+ except Exception:
51
+ context = Context()
49
52
  kwargs[key] = context
50
53
  return kwargs
51
54