testutil

package
v0.0.0-...-c3fa2bf Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomChatCompletionResponse

func GetRandomChatCompletionResponse(n int) openai.ChatCompletionResponse

func GetRandomEmbedding

func GetRandomEmbedding(n int) []float32

func GetRandomEmbeddingResponse

func GetRandomEmbeddingResponse(n int, dim int) openai.EmbeddingResponse

Types

type TestAPI

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

func NewTestAPI

func NewTestAPI(baseAPIURL, apiKey string) *TestAPI

func (*TestAPI) SendRequest

func (api *TestAPI) SendRequest(ctx context.Context, chatRequest openai.ChatCompletionRequest) (*openai.ChatCompletionResponse, error)

Jump to

Keyboard shortcuts

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