promptbuilder 0.4.25__tar.gz → 0.4.27__tar.gz
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-0.4.25/promptbuilder.egg-info → promptbuilder-0.4.27}/PKG-INFO +1 -1
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/base_client.py +6 -2
- {promptbuilder-0.4.25 → promptbuilder-0.4.27/promptbuilder.egg-info}/PKG-INFO +1 -1
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/setup.py +1 -1
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/LICENSE +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/MANIFEST.in +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/Readme.md +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/__init__.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/agent/__init__.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/agent/agent.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/agent/context.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/agent/tool.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/agent/utils.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/embeddings.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/__init__.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/aisuite_client.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/anthropic_client.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/bedrock_client.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/config.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/exceptions.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/google_client.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/logfire_decorators.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/main.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/openai_client.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/types.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/utils.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/prompt_builder.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder.egg-info/SOURCES.txt +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder.egg-info/dependency_links.txt +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder.egg-info/requires.txt +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder.egg-info/top_level.txt +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/pyproject.toml +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/setup.cfg +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/tests/test_llm_client.py +0 -0
- {promptbuilder-0.4.25 → promptbuilder-0.4.27}/tests/test_llm_client_async.py +0 -0
|
@@ -104,7 +104,8 @@ class BaseLLMClient(ABC, utils.InheritDecoratorsMixin):
|
|
|
104
104
|
|
|
105
105
|
total_count = BaseLLMClient._response_out_tokens(response)
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
finish_reason = response.candidates[0].finish_reason.value if response.candidates and response.candidates[0].finish_reason else None
|
|
108
|
+
while autocomplete and response.candidates and finish_reason == FinishReason.MAX_TOKENS.value:
|
|
108
109
|
BaseLLMClient._append_generated_part(messages, response)
|
|
109
110
|
|
|
110
111
|
response = self._create(
|
|
@@ -116,6 +117,7 @@ class BaseLLMClient(ABC, utils.InheritDecoratorsMixin):
|
|
|
116
117
|
tools=tools,
|
|
117
118
|
tool_config=tool_config,
|
|
118
119
|
)
|
|
120
|
+
finish_reason = response.candidates[0].finish_reason.value if response.candidates and response.candidates[0].finish_reason else None
|
|
119
121
|
total_count += BaseLLMClient._response_out_tokens(response)
|
|
120
122
|
if max_tokens is not None and total_count >= max_tokens:
|
|
121
123
|
break
|
|
@@ -436,7 +438,8 @@ class BaseLLMClientAsync(ABC, utils.InheritDecoratorsMixin):
|
|
|
436
438
|
|
|
437
439
|
total_count = BaseLLMClient._response_out_tokens(response)
|
|
438
440
|
|
|
439
|
-
|
|
441
|
+
finish_reason = response.candidates[0].finish_reason.value if response.candidates and response.candidates[0].finish_reason else None
|
|
442
|
+
while autocomplete and response.candidates and finish_reason == FinishReason.MAX_TOKENS.value:
|
|
440
443
|
BaseLLMClient._append_generated_part(messages, response)
|
|
441
444
|
|
|
442
445
|
response = await self._create(
|
|
@@ -448,6 +451,7 @@ class BaseLLMClientAsync(ABC, utils.InheritDecoratorsMixin):
|
|
|
448
451
|
tools=tools,
|
|
449
452
|
tool_config=tool_config,
|
|
450
453
|
)
|
|
454
|
+
finish_reason = response.candidates[0].finish_reason.value if response.candidates and response.candidates[0].finish_reason else None
|
|
451
455
|
total_count += BaseLLMClient._response_out_tokens(response)
|
|
452
456
|
if max_tokens is not None and total_count >= max_tokens:
|
|
453
457
|
break
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{promptbuilder-0.4.25 → promptbuilder-0.4.27}/promptbuilder/llm_client/logfire_decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|