promptbuilder 0.4.26__py3-none-any.whl → 0.4.28__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.
- promptbuilder/llm_client/base_client.py +8 -0
- {promptbuilder-0.4.26.dist-info → promptbuilder-0.4.28.dist-info}/METADATA +1 -1
- {promptbuilder-0.4.26.dist-info → promptbuilder-0.4.28.dist-info}/RECORD +6 -6
- {promptbuilder-0.4.26.dist-info → promptbuilder-0.4.28.dist-info}/WHEEL +0 -0
- {promptbuilder-0.4.26.dist-info → promptbuilder-0.4.28.dist-info}/licenses/LICENSE +0 -0
- {promptbuilder-0.4.26.dist-info → promptbuilder-0.4.28.dist-info}/top_level.txt +0 -0
|
@@ -117,9 +117,13 @@ class BaseLLMClient(ABC, utils.InheritDecoratorsMixin):
|
|
|
117
117
|
tools=tools,
|
|
118
118
|
tool_config=tool_config,
|
|
119
119
|
)
|
|
120
|
+
finish_reason = response.candidates[0].finish_reason.value if response.candidates and response.candidates[0].finish_reason else None
|
|
120
121
|
total_count += BaseLLMClient._response_out_tokens(response)
|
|
121
122
|
if max_tokens is not None and total_count >= max_tokens:
|
|
122
123
|
break
|
|
124
|
+
if response.candidates:
|
|
125
|
+
BaseLLMClient._append_generated_part(messages, response)
|
|
126
|
+
response.candidates[0].content = messages[-1] if len(messages) > 0 else None
|
|
123
127
|
return response
|
|
124
128
|
|
|
125
129
|
@logfire_decorators.create
|
|
@@ -450,9 +454,13 @@ class BaseLLMClientAsync(ABC, utils.InheritDecoratorsMixin):
|
|
|
450
454
|
tools=tools,
|
|
451
455
|
tool_config=tool_config,
|
|
452
456
|
)
|
|
457
|
+
finish_reason = response.candidates[0].finish_reason.value if response.candidates and response.candidates[0].finish_reason else None
|
|
453
458
|
total_count += BaseLLMClient._response_out_tokens(response)
|
|
454
459
|
if max_tokens is not None and total_count >= max_tokens:
|
|
455
460
|
break
|
|
461
|
+
if response.candidates:
|
|
462
|
+
BaseLLMClient._append_generated_part(messages, response)
|
|
463
|
+
response.candidates[0].content = messages[-1] if len(messages) > 0 else None
|
|
456
464
|
return response
|
|
457
465
|
|
|
458
466
|
@logfire_decorators.create_async
|
|
@@ -9,7 +9,7 @@ promptbuilder/agent/utils.py,sha256=vTkphKw04v_QDIJtoB2JKK0RGY6iI1t_0LbmuStunzI,
|
|
|
9
9
|
promptbuilder/llm_client/__init__.py,sha256=wJ33cnRtZX_YPsbcGxEu3SEZMOhPX7-fHI59MEPUe7I,517
|
|
10
10
|
promptbuilder/llm_client/aisuite_client.py,sha256=_TfB1xv73kIn4n8ulV3bj8bHOVm4DOD5uIdX-pbYoXY,15563
|
|
11
11
|
promptbuilder/llm_client/anthropic_client.py,sha256=HSIAZVOQoi3hinjhBVGqpt91k0x38xj6EUsPSUrlAA0,28076
|
|
12
|
-
promptbuilder/llm_client/base_client.py,sha256=
|
|
12
|
+
promptbuilder/llm_client/base_client.py,sha256=T-51WbVuMktCdoI0Z7Mk4LcaqV6GRqoDiZeZJPKoimI,28763
|
|
13
13
|
promptbuilder/llm_client/bedrock_client.py,sha256=rJMzVV7x_sNJ1nVVqWU1sU-Pq7xlxFxIa_hTD2wtM1Y,27943
|
|
14
14
|
promptbuilder/llm_client/config.py,sha256=exQEm35wp7lK5SfXNpN5H9VZEb2LVa4pyZ-cxGt1U-U,1124
|
|
15
15
|
promptbuilder/llm_client/exceptions.py,sha256=t-X7r_a8B1jNu8eEavde1jXu5dz97yV3IG4YHOtgh0Y,4836
|
|
@@ -19,8 +19,8 @@ promptbuilder/llm_client/main.py,sha256=5r_MhKVTD4cS90AHR89JJRKiWYBk35Y3JvhvmOxk
|
|
|
19
19
|
promptbuilder/llm_client/openai_client.py,sha256=lT0RCiixJBoCtzUbL_0J5NQ5G8KGONzK3dQ73_NgL78,24789
|
|
20
20
|
promptbuilder/llm_client/types.py,sha256=kgbg5FRzvZwu98y1OhAZJDneXBNPnsFZueQCr9HXIY4,8063
|
|
21
21
|
promptbuilder/llm_client/utils.py,sha256=79lvSppjrrItHB5MIozbp_5Oq7TsOK4Qzt9Ae3XMLFw,7624
|
|
22
|
-
promptbuilder-0.4.
|
|
23
|
-
promptbuilder-0.4.
|
|
24
|
-
promptbuilder-0.4.
|
|
25
|
-
promptbuilder-0.4.
|
|
26
|
-
promptbuilder-0.4.
|
|
22
|
+
promptbuilder-0.4.28.dist-info/licenses/LICENSE,sha256=fqXmInzgsvEOIaKSBgcrwKyYCGYF0MKErJ0YivtODcc,1096
|
|
23
|
+
promptbuilder-0.4.28.dist-info/METADATA,sha256=O94B_otCBTHQHr5G_-VqiC5a_xj8rCSydUSzG0GABIo,3729
|
|
24
|
+
promptbuilder-0.4.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
promptbuilder-0.4.28.dist-info/top_level.txt,sha256=UBVcYn4UgrPy3O3fmmnPEU_kieuplBMgheetIMei4EI,14
|
|
26
|
+
promptbuilder-0.4.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|