mojentic 0.5.2__tar.gz → 0.5.3__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.
Files changed (103) hide show
  1. {mojentic-0.5.2/src/mojentic.egg-info → mojentic-0.5.3}/PKG-INFO +1 -1
  2. {mojentic-0.5.2 → mojentic-0.5.3}/pyproject.toml +1 -1
  3. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/broker_examples.py +29 -10
  4. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/message_composers.py +5 -2
  5. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/date_resolver.py +4 -3
  6. {mojentic-0.5.2 → mojentic-0.5.3/src/mojentic.egg-info}/PKG-INFO +1 -1
  7. {mojentic-0.5.2 → mojentic-0.5.3}/LICENSE.md +0 -0
  8. {mojentic-0.5.2 → mojentic-0.5.3}/README.md +0 -0
  9. {mojentic-0.5.2 → mojentic-0.5.3}/setup.cfg +0 -0
  10. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/__init__.py +0 -0
  11. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/broker_as_tool.py +0 -0
  12. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/characterize_ollama.py +0 -0
  13. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/characterize_openai.py +0 -0
  14. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/chat_session.py +0 -0
  15. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/chat_session_with_tool.py +0 -0
  16. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/coding_file_tool.py +0 -0
  17. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/current_datetime_tool_example.py +0 -0
  18. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/design_analysis.py +0 -0
  19. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/embeddings.py +0 -0
  20. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/ensures_files_exist.py +0 -0
  21. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/file_deduplication.py +0 -0
  22. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/file_tool.py +0 -0
  23. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/image_analysis.py +0 -0
  24. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/image_broker.py +0 -0
  25. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/image_broker_splat.py +0 -0
  26. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/iterative_solver.py +0 -0
  27. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/list_models.py +0 -0
  28. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/raw.py +0 -0
  29. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/__init__.py +0 -0
  30. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/agents/__init__.py +0 -0
  31. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/agents/decisioning_agent.py +0 -0
  32. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/agents/thinking_agent.py +0 -0
  33. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/formatters.py +0 -0
  34. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/models/__init__.py +0 -0
  35. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/models/base.py +0 -0
  36. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react/models/events.py +0 -0
  37. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/react.py +0 -0
  38. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/recursive_agent.py +0 -0
  39. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/routed_send_response.py +0 -0
  40. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/simple_llm.py +0 -0
  41. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/simple_llm_repl.py +0 -0
  42. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/simple_structured.py +0 -0
  43. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/simple_tool.py +0 -0
  44. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/solver_chat_session.py +0 -0
  45. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/streaming.py +0 -0
  46. {mojentic-0.5.2 → mojentic-0.5.3}/src/_examples/working_memory.py +0 -0
  47. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/__init__.py +0 -0
  48. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/__init__.py +0 -0
  49. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/agent_broker.py +0 -0
  50. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/base_agent.py +0 -0
  51. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/base_llm_agent.py +0 -0
  52. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/base_llm_agent_spec.py +0 -0
  53. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/correlation_aggregator_agent.py +0 -0
  54. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/iterative_problem_solver.py +0 -0
  55. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/output_agent.py +0 -0
  56. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/agents/simple_recursive_agent.py +0 -0
  57. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/audit/event_store.py +0 -0
  58. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/audit/event_store_spec.py +0 -0
  59. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/context/__init__.py +0 -0
  60. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/context/shared_working_memory.py +0 -0
  61. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/dispatcher.py +0 -0
  62. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/event.py +0 -0
  63. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/__init__.py +0 -0
  64. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/chat_session.py +0 -0
  65. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/chat_session_spec.py +0 -0
  66. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/__init__.py +0 -0
  67. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/anthropic.py +0 -0
  68. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/anthropic_messages_adapter.py +0 -0
  69. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/embeddings_gateway.py +0 -0
  70. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/file_gateway.py +0 -0
  71. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/llm_gateway.py +0 -0
  72. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/models.py +0 -0
  73. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/ollama.py +0 -0
  74. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/ollama_messages_adapter.py +0 -0
  75. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/ollama_messages_adapter_spec.py +0 -0
  76. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/openai.py +0 -0
  77. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/openai_message_adapter_spec.py +0 -0
  78. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/openai_messages_adapter.py +0 -0
  79. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/gateways/tokenizer_gateway.py +0 -0
  80. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/llm_broker.py +0 -0
  81. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/llm_broker_spec.py +0 -0
  82. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/message_composers_spec.py +0 -0
  83. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/registry/__init__.py +0 -0
  84. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/registry/llm_registry.py +0 -0
  85. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/registry/models.py +0 -0
  86. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/registry/populate_registry_from_ollama.py +0 -0
  87. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/__init__.py +0 -0
  88. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/ask_user_tool.py +0 -0
  89. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/current_datetime.py +0 -0
  90. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/date_resolver_spec.py +0 -0
  91. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/file_manager.py +0 -0
  92. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/llm_tool.py +0 -0
  93. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/tool_wrapper.py +0 -0
  94. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/tool_wrapper_spec.py +0 -0
  95. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/llm/tools/web_search.py +0 -0
  96. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/router.py +0 -0
  97. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/router_spec.py +0 -0
  98. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/utils/__init__.py +0 -0
  99. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic/utils/formatting.py +0 -0
  100. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic.egg-info/SOURCES.txt +0 -0
  101. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic.egg-info/dependency_links.txt +0 -0
  102. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic.egg-info/requires.txt +0 -0
  103. {mojentic-0.5.2 → mojentic-0.5.3}/src/mojentic.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mojentic
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Mojentic is an agentic framework that aims to provide a simple and flexible way to assemble teams of agents to solve complex problems.
5
5
  Author-email: Stacey Vetzal <stacey@vetzal.com>
6
6
  Project-URL: Homepage, https://github.com/mojility/mojentic
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mojentic"
3
- version = "0.5.2"
3
+ version = "0.5.3"
4
4
  authors = [
5
5
  { name = "Stacey Vetzal", email = "stacey@vetzal.com" },
6
6
  ]
@@ -1,4 +1,8 @@
1
+ import logging
1
2
  import os
3
+
4
+ logging.basicConfig(level=logging.WARN)
5
+
2
6
  from pathlib import Path
3
7
 
4
8
  from pydantic import BaseModel, Field
@@ -39,19 +43,34 @@ def check_tool_use(llm):
39
43
  tools=[ResolveDateTool()])
40
44
  print(result)
41
45
 
42
- def check_image_analysis(llm):
46
+ def check_image_analysis(llm, image_path: Path = None):
47
+ if image_path is None:
48
+ image_path = Path.cwd() / 'images' / 'flash_rom.jpg'
43
49
  result = llm.generate(messages=[
44
50
  (LLMMessage(content='What is in this image?',
45
- image_paths=[str(Path.cwd() / 'images' / 'flash_rom.jpg')]))
51
+ image_paths=[str(image_path)]))
46
52
  ])
47
53
  print(result)
48
54
 
49
- check_simple_textgen(openai_llm())
50
- check_structured_output(openai_llm())
51
- check_tool_use(openai_llm())
52
- check_image_analysis(openai_llm())
55
+ models = ["gpt-4o", "gpt-4.1", "o3", "gpt-4.5-preview", "o4-mini"]
56
+ images = [
57
+ Path.cwd() / 'images' / 'flash_rom.jpg',
58
+ Path.cwd() / 'images' / 'screen_cap.png',
59
+ Path.cwd() / 'images' / 'xbox-one.jpg',
60
+ ]
61
+
62
+ for image in images:
63
+ for model in models:
64
+ print(f"Checking {model} with {str(image)}")
65
+ check_image_analysis(openai_llm(model=model), image)
66
+
67
+
68
+ # check_simple_textgen(openai_llm(model="o4-mini"))
69
+ # check_structured_output(openai_llm(model="o4-mini"))
70
+ # check_tool_use(openai_llm(model="o4-mini"))
71
+ # check_image_analysis(openai_llm(model="gpt-4o"))
53
72
 
54
- check_simple_textgen(ollama_llm())
55
- check_structured_output(ollama_llm())
56
- check_tool_use(ollama_llm())
57
- check_image_analysis(ollama_llm(model="gemma3:27b"))
73
+ # check_simple_textgen(ollama_llm())
74
+ # check_structured_output(ollama_llm())
75
+ # check_tool_use(ollama_llm())
76
+ # check_image_analysis(ollama_llm(model="gemma3:27b"))
@@ -318,11 +318,14 @@ class MessageBuilder():
318
318
  LLMMessage
319
319
  An LLMMessage object containing the message content and image paths.
320
320
  """
321
+ parts = []
321
322
  if self.file_paths:
322
323
  file_contents = [self._file_content_partial(p) for p in self.file_paths]
323
- self.content = "\n\n".join(file_contents)
324
+ parts.append("\n\n".join(file_contents))
325
+ if self.content is not None:
326
+ parts.append(self.content)
324
327
  return LLMMessage(
325
328
  role=self.role,
326
- content=self.content,
329
+ content="\n\n".join(parts),
327
330
  image_paths=[str(p) for p in self.image_paths]
328
331
  )
@@ -21,7 +21,8 @@ class ResolveDateTool(LLMTool):
21
21
 
22
22
  return {
23
23
  "relative_date": relative_date_found,
24
- "resolved_date": resolved_date.strftime('%Y-%m-%d')
24
+ "resolved_date": resolved_date.strftime('%Y-%m-%d'),
25
+ "summary": f"The date on '{relative_date_found}' is {resolved_date.strftime('%Y-%m-%d')}"
25
26
  }
26
27
 
27
28
  @property
@@ -30,7 +31,7 @@ class ResolveDateTool(LLMTool):
30
31
  "type": "function",
31
32
  "function": {
32
33
  "name": "resolve_date",
33
- "description": "Take text that specifies a relative date, and output an absolute date. If no reference date is provided, the current date is used.",
34
+ "description": "Take text that specifies a relative date, and output an absolute date. If no reference date is available, the current date is used.",
34
35
  "parameters": {
35
36
  "type": "object",
36
37
  "properties": {
@@ -41,7 +42,7 @@ class ResolveDateTool(LLMTool):
41
42
  "reference_date_in_iso8601": {
42
43
  "type": "string",
43
44
  "description": "The date from which the resolved date should be calculated, in YYYY-MM-DD"
44
- " format. If not provided, the current date is used."
45
+ " format. Do not provide if you weren't provided one, I will assume the current date."
45
46
  }
46
47
  },
47
48
  "additionalProperties": False,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mojentic
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Mojentic is an agentic framework that aims to provide a simple and flexible way to assemble teams of agents to solve complex problems.
5
5
  Author-email: Stacey Vetzal <stacey@vetzal.com>
6
6
  Project-URL: Homepage, https://github.com/mojility/mojentic
File without changes
File without changes
File without changes
File without changes
File without changes