MCPcopy Create free account
hub / github.com/microsoft/TypeChat / complete

Method complete

python/tests/test_translator.py:22–31  ·  view source on GitHub ↗
(self, prompt: str | list[typechat.PromptSection])

Source from the content-addressed store, hash-verified

20
21 @override
22 async def complete(self, prompt: str | list[typechat.PromptSection]) -> typechat.Result[str]:
23 # Capture a snapshot because the translator
24 # can choose to pass in the same underlying list.
25 if isinstance(prompt, list):
26 prompt = prompt.copy()
27
28 self.conversation.append({ "kind": "CLIENT REQUEST", "payload": prompt })
29 response = next(self.responses)
30 self.conversation.append({ "kind": "MODEL RESPONSE", "payload": response })
31 return typechat.Success(response)
32
33@dataclass
34class ExampleABC:

Callers

nothing calls this directly

Calls 1

nextFunction · 0.85

Tested by

no test coverage detected