openai

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 3 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 {
	// contains filtered or unexported fields
}

func NewOpenAIClient

func NewOpenAIClient(conf *config.Config) *OpenAIClient

func (*OpenAIClient) CreateChatCompletion

func (o *OpenAIClient) CreateChatCompletion(
	ctx context.Context,
	request *openai.ChatCompletionRequest,
) (response *openai.ChatCompletionResponse, err error)

func (*OpenAIClient) CreateChatCompletionStream

func (o *OpenAIClient) CreateChatCompletionStream(
	ctx context.Context,
	request *openai.ChatCompletionRequest,
) (stream *openai.ChatCompletionStream, err error)

func (*OpenAIClient) CreateSpeech

func (o *OpenAIClient) CreateSpeech(
	ctx context.Context,
	request *openai.CreateSpeechRequest,
) (response *openai.RawResponse, err error)

func (*OpenAIClient) CreateTranscription

func (o *OpenAIClient) CreateTranscription(
	ctx context.Context,
	request *openai.AudioRequest,
) (response *openai.AudioResponse, err error)

Jump to

Keyboard shortcuts

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