kgmodule-utils 0.4.4__tar.gz → 0.4.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.
Files changed (27) hide show
  1. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/PKG-INFO +2 -2
  2. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/README.md +1 -1
  3. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/pyproject.toml +1 -1
  4. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/__init__.py +1 -1
  5. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/synthesis/_text.py +25 -0
  6. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/LICENSE +0 -0
  7. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/embed.py +0 -0
  8. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/embedder.py +0 -0
  9. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/extractor.py +0 -0
  10. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/module.py +0 -0
  11. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/pipeline.py +0 -0
  12. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/py.typed +0 -0
  13. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/retrieval/__init__.py +0 -0
  14. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/retrieval/hits.py +0 -0
  15. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/semantic.py +0 -0
  16. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/snapshots/__init__.py +0 -0
  17. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/snapshots/manager.py +0 -0
  18. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/snapshots/models.py +0 -0
  19. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/specs.py +0 -0
  20. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/store.py +0 -0
  21. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/synthesis/__init__.py +0 -0
  22. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/synthesis/_config.py +0 -0
  23. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/synthesis/_image.py +0 -0
  24. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/synthesis/factory.py +0 -0
  25. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/worker/__init__.py +0 -0
  26. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/worker/client.py +0 -0
  27. {kgmodule_utils-0.4.4 → kgmodule_utils-0.4.5}/src/kg_utils/worker/ops.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kgmodule-utils
3
- Version: 0.4.4
3
+ Version: 0.4.5
4
4
  Summary: Shared types, graph store, semantic index, and pipeline base for the KGModule SDK
5
5
  License: Elastic-2.0
6
6
  License-File: LICENSE
@@ -35,7 +35,7 @@ Description-Content-Type: text/markdown
35
35
 
36
36
  [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13-blue.svg)](https://www.python.org/)
37
37
  [![License: Elastic-2.0](https://img.shields.io/badge/License-Elastic%202.0-blue.svg)](https://www.elastic.co/licensing/elastic-license)
38
- [![Version](https://img.shields.io/badge/version-0.4.0-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
38
+ [![Version](https://img.shields.io/badge/version-0.4.4-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
39
39
  [![CI](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml/badge.svg)](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml)
40
40
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
41
41
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13-blue.svg)](https://www.python.org/)
3
3
  [![License: Elastic-2.0](https://img.shields.io/badge/License-Elastic%202.0-blue.svg)](https://www.elastic.co/licensing/elastic-license)
4
- [![Version](https://img.shields.io/badge/version-0.4.0-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
4
+ [![Version](https://img.shields.io/badge/version-0.4.4-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
5
5
  [![CI](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml/badge.svg)](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml)
6
6
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
7
7
 
@@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api"
10
10
 
11
11
  [project]
12
12
  name = "kgmodule-utils"
13
- version = "0.4.4"
13
+ version = "0.4.5"
14
14
  description = "Shared types, graph store, semantic index, and pipeline base for the KGModule SDK"
15
15
  readme = "README.md"
16
16
  license = { text = "Elastic-2.0" }
@@ -24,4 +24,4 @@ Optional extras
24
24
  pip install 'kgmodule-utils[synthesis-mflux]' # + mflux (Apple Silicon local gen)
25
25
  """
26
26
 
27
- __version__ = "0.4.4"
27
+ __version__ = "0.4.5"
@@ -98,6 +98,31 @@ class TextSynthesizer:
98
98
  # Public API
99
99
  # ------------------------------------------------------------------
100
100
 
101
+ def complete(
102
+ self,
103
+ messages: list[dict],
104
+ *,
105
+ model: str | None = None,
106
+ max_tokens: int | None = None,
107
+ temperature: float = 0.7,
108
+ ) -> str | None:
109
+ """Run a raw chat completion against the configured backend.
110
+
111
+ General-purpose entry point for callers that build their own message
112
+ list — summarization, classification, arbitrary prompting — rather than
113
+ using :meth:`synthesize_rag` or :meth:`rewrite_for_image`. Applies the
114
+ same oMLX thinking suppression and ``<think>`` stripping as the other
115
+ public methods.
116
+
117
+ :param messages: OpenAI-style chat messages (``[{"role": ..., "content": ...}]``).
118
+ :param model: Override the configured model for this single call.
119
+ :param max_tokens: Override the configured ``max_tokens`` for this call.
120
+ :param temperature: Sampling temperature (lower = more deterministic).
121
+ :returns: The completion text with thinking stripped, or ``None`` on
122
+ failure or empty output.
123
+ """
124
+ return self._complete(messages, model=model, max_tokens=max_tokens, temperature=temperature)
125
+
101
126
  def list_models(self) -> list[str]:
102
127
  """Return the model IDs available at the configured endpoint.
103
128
 
File without changes