(
messages: Array<OpenAI.Chat.Completions.ChatCompletionMessageParam>
)
| 26 | } |
| 27 | |
| 28 | async generateCommitMessage( |
| 29 | messages: Array<OpenAI.Chat.Completions.ChatCompletionMessageParam> |
| 30 | ): Promise<string | undefined> { |
| 31 | const params = { |
| 32 | messages, |
| 33 | temperature: 0, |
| 34 | top_p: 0.1, |
| 35 | repetition_penalty: 1.5, |
| 36 | stream: false |
| 37 | }; |
| 38 | try { |
| 39 | const response = await this.client.post(this.chatUrl, params); |
| 40 | |
| 41 | const choices = response.data.choices; |
| 42 | const message = choices[0].message; |
| 43 | let content = message?.content; |
| 44 | return removeContentTags(content, 'think'); |
| 45 | } catch (error) { |
| 46 | throw normalizeEngineError(error, 'mlx', this.config.model); |
| 47 | } |
| 48 | } |
| 49 | } |
nothing calls this directly
no test coverage detected