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

Interface TypeChatLanguageModel

typescript/src/model.ts:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 * and `createAzureOpenAILanguageModel` functions create instances of this interface.
61 */
62export interface TypeChatLanguageModel {
63 /**
64 * Optional property that specifies the maximum number of retry attempts (the default is 3).
65 */
66 retryMaxAttempts?: number;
67 /**
68 * Optional property that specifies the delay before retrying in milliseconds (the default is 1000ms).
69 */
70 retryPauseMs?: number;
71 /**
72 * Obtains a completion from the language model for the given prompt.
73 * @param prompt A prompt string or an array of prompt sections. If a string is specified,
74 * it is converted into a single "user" role prompt section.
75 */
76 complete(prompt: string | PromptSection[]): Promise<Result<string>>;
77}
78
79/**
80 * Creates a language model encapsulation of an OpenAI or Azure OpenAI REST API endpoint

Callers 5

translateMethod · 0.65
translateFunction · 0.65
model.test.mjsFile · 0.65
llmFilterFunction · 0.65
handleCallFunction · 0.65

Implementers 3

TypeChatLanguageModelpython/src/typechat/_internal/model.py
HttpxLanguageModelpython/src/typechat/_internal/model.py
FixedModelpython/tests/test_translator.py

Calls

no outgoing calls

Tested by

no test coverage detected