MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / FakeSemanticCompressor

Class FakeSemanticCompressor

tests/test_composition.py:25–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class FakeSemanticCompressor:
26 async def summarize_tool_result(self, content: str, *, tool_name: str, latest_user_prompt: str, request: object) -> SemanticCallResult | None:
27 return SemanticCallResult(
28 text=f"summary for {tool_name}: key findings only",
29 model="deepseek/deepseek-chat",
30 estimated_cost=0.001,
31 actual_cost=0.0007,
32 )
33
34 async def summarize_history(self, transcript: str, *, latest_user_prompt: str, session_id: str, request: object) -> SemanticCallResult | None:
35 return SemanticCallResult(
36 text=f"checkpoint for {session_id}: goal, files, blockers",
37 model="deepseek/deepseek-chat",
38 estimated_cost=0.002,
39 actual_cost=0.0014,
40 )
41
42 async def rehydrate_artifact(self, query: str, *, artifact_id: str, content: str, summary: str, request: object) -> SemanticCallResult | None:
43 return SemanticCallResult(
44 text=f"excerpt for {artifact_id}: the relevant section",
45 model="deepseek/deepseek-chat",
46 estimated_cost=0.001,
47 actual_cost=0.0008,
48 )
49
50
51class QualityFallbackSemanticCompressor(FakeSemanticCompressor):

Calls

no outgoing calls