MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / _make_client

Function _make_client

tests/test_compact_plugin.py:15–23  ·  view source on GitHub ↗
(summary_text="<summary>Test summary with Key decisions: decided X.</summary>")

Source from the content-addressed store, hash-verified

13
14
15def _make_client(summary_text="<summary>Test summary with Key decisions: decided X.</summary>"):
16 mock_response = MagicMock()
17 mock_response.choices = [MagicMock()]
18 mock_response.choices[0].message.content = summary_text
19 mock_response.usage.completion_tokens = 80
20 client = MagicMock()
21 client.chat.completions.create.return_value = mock_response
22 client.models.retrieve.return_value = MagicMock(spec=[])
23 return client
24
25
26class TestEstimateTokens:

Calls

no outgoing calls

Tested by

no test coverage detected