promptbuilder 0.4.37__tar.gz → 0.4.38__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.37/promptbuilder.egg-info → promptbuilder-0.4.38}/PKG-INFO +1 -1
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/logfire_decorators.py +6 -3
- {promptbuilder-0.4.37 → promptbuilder-0.4.38/promptbuilder.egg-info}/PKG-INFO +1 -1
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/setup.py +1 -1
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/LICENSE +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/MANIFEST.in +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/Readme.md +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/__init__.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/agent/__init__.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/agent/agent.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/agent/context.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/agent/tool.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/agent/utils.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/embeddings.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/__init__.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/aisuite_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/anthropic_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/base_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/bedrock_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/config.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/exceptions.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/google_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/litellm_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/main.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/openai_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/types.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/utils.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/vertex_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/prompt_builder.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder.egg-info/SOURCES.txt +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder.egg-info/dependency_links.txt +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder.egg-info/requires.txt +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder.egg-info/top_level.txt +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/pyproject.toml +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/setup.cfg +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/tests/test_llm_client.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/tests/test_llm_client_async.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/tests/test_timeout_google.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/tests/test_timeout_litellm.py +0 -0
- {promptbuilder-0.4.37 → promptbuilder-0.4.38}/tests/test_timeout_openai.py +0 -0
{promptbuilder-0.4.37 → promptbuilder-0.4.38}/promptbuilder/llm_client/logfire_decorators.py
RENAMED
|
@@ -46,9 +46,12 @@ def extract_response_data(response: Response) -> dict[str, Any]:
|
|
|
46
46
|
response_data = {"message": {"role": "assistant"}}
|
|
47
47
|
response_data["message"]["content"] = response.text
|
|
48
48
|
tool_calls = []
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
if response.candidates is not None and len(response.candidates) > 0:
|
|
50
|
+
content = response.candidates[0].content
|
|
51
|
+
if content is not None and content.parts is not None:
|
|
52
|
+
for part in content.parts:
|
|
53
|
+
if part.function_call is not None:
|
|
54
|
+
tool_calls.append({"function": {"name": part.function_call.name, "arguments": part.function_call.args}})
|
|
52
55
|
if len(tool_calls) > 0:
|
|
53
56
|
response_data["message"]["tool_calls"] = tool_calls
|
|
54
57
|
return response_data
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|