| 60 | * and `createAzureOpenAILanguageModel` functions create instances of this interface. |
| 61 | */ |
| 62 | export 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 |
no outgoing calls
no test coverage detected