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

Function createAzureOpenAILanguageModel

typescript/src/model.ts:149–157  ·  view source on GitHub ↗
(apiKey: string, endPoint: string)

Source from the content-addressed store, hash-verified

147 * @returns An instance of `TypeChatLanguageModel`.
148 */
149export function createAzureOpenAILanguageModel(apiKey: string, endPoint: string): TypeChatLanguageModel {
150 const headers = {
151 // Needed when using managed identity
152 "Authorization": `Bearer ${apiKey}`,
153 // Needed when using regular API key
154 "api-key": apiKey
155 };
156 return createFetchLanguageModel(endPoint, headers, {});
157}
158
159/**
160 * Common OpenAI REST API endpoint encapsulation using the fetch API.

Callers 1

createLanguageModelFunction · 0.85

Calls 1

createFetchLanguageModelFunction · 0.85

Tested by

no test coverage detected