agentic-blocks 0.1.4__tar.gz → 0.1.5__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.
- {agentic_blocks-0.1.4/src/agentic_blocks.egg-info → agentic_blocks-0.1.5}/PKG-INFO +1 -1
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/pyproject.toml +1 -1
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks/llm.py +11 -6
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5/src/agentic_blocks.egg-info}/PKG-INFO +1 -1
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/LICENSE +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/README.md +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/setup.cfg +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks/__init__.py +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks/mcp_client.py +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks/messages.py +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks.egg-info/SOURCES.txt +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks.egg-info/dependency_links.txt +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks.egg-info/requires.txt +0 -0
- {agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks.egg-info/top_level.txt +0 -0
@@ -14,7 +14,7 @@ agentic_blocks = []
|
|
14
14
|
|
15
15
|
[project]
|
16
16
|
name = "agentic-blocks"
|
17
|
-
version = "0.1.
|
17
|
+
version = "0.1.5"
|
18
18
|
description = "Simple building blocks for agentic AI systems with MCP client and conversation management"
|
19
19
|
readme = "README.md"
|
20
20
|
requires-python = ">=3.11"
|
@@ -24,7 +24,7 @@ def call_llm(
|
|
24
24
|
model: str = "gpt-4o-mini",
|
25
25
|
base_url: Optional[str] = None,
|
26
26
|
**kwargs,
|
27
|
-
) ->
|
27
|
+
) -> Any:
|
28
28
|
"""
|
29
29
|
Call an LLM completion API with the provided messages.
|
30
30
|
|
@@ -37,7 +37,7 @@ def call_llm(
|
|
37
37
|
**kwargs: Additional parameters to pass to OpenAI API
|
38
38
|
|
39
39
|
Returns:
|
40
|
-
The
|
40
|
+
The complete message object from the OpenAI API response
|
41
41
|
|
42
42
|
Raises:
|
43
43
|
LLMError: If API call fails or configuration is invalid
|
@@ -86,8 +86,8 @@ def call_llm(
|
|
86
86
|
# Make completion request
|
87
87
|
response = client.chat.completions.create(**completion_params)
|
88
88
|
|
89
|
-
#
|
90
|
-
return response.choices[0].message
|
89
|
+
# Return the complete message object
|
90
|
+
return response.choices[0].message
|
91
91
|
|
92
92
|
except Exception as e:
|
93
93
|
raise LLMError(f"Failed to call LLM API: {e}")
|
@@ -132,12 +132,17 @@ def example_usage():
|
|
132
132
|
# Call with Messages object
|
133
133
|
print("Using Messages object:")
|
134
134
|
response1 = call_llm(messages_obj, temperature=0.7)
|
135
|
-
print(f"Response: {response1}")
|
135
|
+
print(f"Response: {response1.content}")
|
136
136
|
|
137
137
|
# Call with raw message list
|
138
138
|
print("\nUsing raw message list:")
|
139
139
|
response2 = call_llm(messages_list, tools=tools, temperature=0.5)
|
140
|
-
|
140
|
+
if hasattr(response2, 'tool_calls') and response2.tool_calls:
|
141
|
+
print(f"Tool calls requested: {len(response2.tool_calls)}")
|
142
|
+
for i, tool_call in enumerate(response2.tool_calls):
|
143
|
+
print(f" {i+1}. {tool_call.function.name}({tool_call.function.arguments})")
|
144
|
+
else:
|
145
|
+
print(f"Response: {response2.content}")
|
141
146
|
|
142
147
|
except LLMError as e:
|
143
148
|
print(f"Error: {e}")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agentic_blocks-0.1.4 → agentic_blocks-0.1.5}/src/agentic_blocks.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|