openai

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAIClient

type OpenAIClient struct {
	ai.BaseAIClient
	// contains filtered or unexported fields
}

func NewOpenAIClient

func NewOpenAIClient(key, model string) *OpenAIClient

func (*OpenAIClient) GetCommitMessage

func (oc *OpenAIClient) GetCommitMessage(ctx context.Context, prompt string) (string, error)

func (*OpenAIClient) MaybeSummarizeDiff

func (oc *OpenAIClient) MaybeSummarizeDiff(diff string, maxLength int) (string, bool)

func (*OpenAIClient) SanitizeResponse

func (oc *OpenAIClient) SanitizeResponse(message, commitType string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL