openairetryclient

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAIRetryClient

type OpenAIRetryClient struct {
	openai.Client
	Config struct {
		Timeout     time.Duration
		MaxAttempts uint
	}
}

func (*OpenAIRetryClient) CreateChatCompletionWithRetry

func (c *OpenAIRetryClient) CreateChatCompletionWithRetry(
	ctx context.Context,
	request openai.ChatCompletionRequest,
) (*openai.ChatCompletionResponse, error)

func (*OpenAIRetryClient) CreateEmbeddingsWithRetry

func (c *OpenAIRetryClient) CreateEmbeddingsWithRetry(
	ctx context.Context,
	request openai.EmbeddingRequest,
) (*openai.EmbeddingResponse, error)

Jump to

Keyboard shortcuts

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