diff --git a/examples/integrations/litellm/basic.py b/examples/integrations/litellm/basic.py index 95053a8..49da0f9 100644 --- a/examples/integrations/litellm/basic.py +++ b/examples/integrations/litellm/basic.py @@ -175,7 +175,7 @@ def _persist_session_checkpoint_if_needed( ) -> None: if session_key is None: return - if kind not in {"update", "clarify"}: + if kind not in {DECISION_UPDATE, DECISION_CLARIFY}: return _CHECKPOINTS_BY_SESSION_KEY[session_key] = engine.export_checkpoint_json() @@ -305,7 +305,7 @@ def handle_turn(user_input: str, engine: Engine, *, session_key: str | None = No near_miss_prompt, original_input=user_input, compiler_input=user_input, - decision={"kind": "clarify", "prompt_to_user": near_miss_prompt}, + decision={"kind": DECISION_CLARIFY, "prompt_to_user": near_miss_prompt}, state_before=state_before, state_after=engine.state, llm_called=False, diff --git a/examples/integrations/litellm/with_preprocessor.py b/examples/integrations/litellm/with_preprocessor.py index ce228ad..01c449b 100644 --- a/examples/integrations/litellm/with_preprocessor.py +++ b/examples/integrations/litellm/with_preprocessor.py @@ -286,7 +286,7 @@ def _persist_session_checkpoint_if_needed( ) -> None: if session_key is None: return - if kind not in {"update", "clarify"}: + if kind not in {DECISION_UPDATE, DECISION_CLARIFY}: return _CHECKPOINTS_BY_SESSION_KEY[session_key] = engine.export_checkpoint_json() @@ -430,7 +430,7 @@ def handle_turn(user_input: str, engine: Engine, *, session_key: str | None = No original_input=user_input, compiler_input=compile_input, preprocessor_output=preprocessd, - decision={"kind": "clarify", "prompt_to_user": near_miss_prompt}, + decision={"kind": DECISION_CLARIFY, "prompt_to_user": near_miss_prompt}, state_before=state_before, state_after=engine.state, llm_called=False, diff --git a/examples/integrations/openwebui/open_webui_pipe.py b/examples/integrations/openwebui/open_webui_pipe.py index f4a06df..f3c373a 100644 --- a/examples/integrations/openwebui/open_webui_pipe.py +++ b/examples/integrations/openwebui/open_webui_pipe.py @@ -3,7 +3,7 @@ author: rlippmann author_url: https://github.com/rlippmann/context-compiler funding_url: https://github.com/rlippmann/context-compiler -version: 0.9.2 +version: 0.9.3 requirements: context-compiler>=0.7.4 Minimal Open WebUI Pipe integration for Context Compiler. @@ -643,7 +643,7 @@ async def pipe( near_miss_prompt, original_input=latest_user_text, compiler_input=latest_user_text, - decision={"kind": "clarify", "prompt_to_user": near_miss_prompt}, + decision={"kind": DECISION_CLARIFY, "prompt_to_user": near_miss_prompt}, state_before=state_before, state_after=state_after, llm_called=False, diff --git a/examples/integrations/openwebui/open_webui_pipe_with_preprocessor.py b/examples/integrations/openwebui/open_webui_pipe_with_preprocessor.py index c530e09..dce3c77 100644 --- a/examples/integrations/openwebui/open_webui_pipe_with_preprocessor.py +++ b/examples/integrations/openwebui/open_webui_pipe_with_preprocessor.py @@ -3,7 +3,7 @@ author: rlippmann author_url: https://github.com/rlippmann/context-compiler funding_url: https://github.com/rlippmann/context-compiler -version: 0.9.2 +version: 0.9.3 requirements: context-compiler[experimental]>=0.7.4 Open WebUI integration with Context Compiler preprocessor. @@ -922,7 +922,7 @@ async def pipe( near_miss_prompt, original_input=latest_user_text, compiler_input=compile_input, - decision={"kind": "clarify", "prompt_to_user": near_miss_prompt}, + decision={"kind": DECISION_CLARIFY, "prompt_to_user": near_miss_prompt}, state_before=state_before, state_after=state_after, preprocessor_output=preprocessd, diff --git a/pyproject.toml b/pyproject.toml index 0634c01..61305ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "context-compiler" -version = "0.7.4" +version = "0.7.5" description = "Deterministic conversational state engine for LLM applications." readme = "README.md" requires-python = ">=3.11" diff --git a/uv.lock b/uv.lock index cd58755..6a8c81e 100644 --- a/uv.lock +++ b/uv.lock @@ -468,7 +468,7 @@ wheels = [ [[package]] name = "context-compiler" -version = "0.7.4" +version = "0.7.5" source = { editable = "." } [package.optional-dependencies]