openai

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOpenAiEngine

func IsOpenAiEngine(engine string) bool

Types

type Step

type Step struct {
	Settings *settings.StepSettings
}

func (*Step) Close

func (csf *Step) Close(ctx context.Context) error

Close is only called after the returned monad has been entirely consumed

func (*Step) SetStreaming

func (csf *Step) SetStreaming(b bool)

func (*Step) Start

func (csf *Step) Start(
	ctx context.Context,
	messages []*geppetto_context.Message,
) (*steps.StepResult[string], error)

type Transcription added in v0.2.18

type Transcription struct {
	File     string                `json:"file"`
	Response *openai.AudioResponse `json:"response"`
	// contains filtered or unexported fields
}

type TranscriptionClient added in v0.2.18

type TranscriptionClient struct {
	// contains filtered or unexported fields
}

func NewTranscriptionClient added in v0.2.18

func NewTranscriptionClient(apiKey, model, prompt, language string, temperature float32) *TranscriptionClient

func (*TranscriptionClient) TranscribeFile added in v0.2.18

func (tc *TranscriptionClient) TranscribeFile(mp3FilePath string, out chan<- Transcription, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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