Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateTokens ¶
EstimateTokens estimates the number of tokens for generating Swagger comments.
Types ¶
type Client ¶
type Client interface {
GenerateSwaggerComment(functionName, functionContent, model string, routeString string) (string, error)
}
Client is an interface representing the OpenAI client.
type OpenAIClient ¶
type OpenAIClient struct {
// contains filtered or unexported fields
}
OpenAIClient is a struct that implements the Client interface.
func NewOpenAIClient ¶
func NewOpenAIClient(apiKey string) *OpenAIClient
NewOpenAIClient initializes and returns an OpenAI client.
func (*OpenAIClient) GenerateSwaggerComment ¶
func (c *OpenAIClient) GenerateSwaggerComment(functionName, functionContent, model string, routeString string) (string, error)
GenerateSwaggerComment generates Swagger comments using OpenAI API.
Click to show internal directories.
Click to hide internal directories.