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