()
| 183 | } |
| 184 | |
| 185 | override getModel() { |
| 186 | const id = this.options.apiModelId ?? mistralDefaultModelId |
| 187 | const info = mistralModels[id as MistralModelId] ?? mistralModels[mistralDefaultModelId] |
| 188 | |
| 189 | // @TODO: Move this to the `getModelParams` function. |
| 190 | const maxTokens = this.options.includeMaxTokens ? info.maxTokens : undefined |
| 191 | const temperature = this.options.modelTemperature ?? MISTRAL_DEFAULT_TEMPERATURE |
| 192 | |
| 193 | return { id, info, maxTokens, temperature } |
| 194 | } |
| 195 | |
| 196 | async completePrompt(prompt: string): Promise<string> { |
| 197 | const { id: model, temperature } = this.getModel() |
no outgoing calls
no test coverage detected