ai

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generative

type Generative interface {
	// CreateCompletion is an API call to create a completion.
	Completion(ctx context.Context, content string) (resp *Response, err error)
}

type Response

type Response struct {
	Content string
	Usage   Usage
}

type Usage

type Usage struct {
	PromptTokens            int
	CompletionTokens        int
	TotalTokens             int
	CompletionTokensDetails *openai.CompletionTokensDetails
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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