MCPcopy Index your code
hub / github.com/microsoft/TypeChat / TypeChatLanguageModel

Class TypeChatLanguageModel

python/src/typechat/_internal/model.py:18–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 content: str
17
18class TypeChatLanguageModel(Protocol):
19 async def complete(self, prompt: str | list[PromptSection]) -> Result[str]:
20 """
21 Represents a AI language model that can complete prompts.
22
23 TypeChat uses an implementation of this protocol to communicate
24 with an AI service that can translate natural language requests to JSON
25 instances according to a provided schema.
26 The `create_language_model` function can create an instance.
27 """
28 ...
29
30_TRANSIENT_ERROR_CODES = [
31 429,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected