factories

package
v0.0.0-...-cab9e6e Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateApplication

func CreateApplication(ctx context.Context, projectID pgtype.UUID) (*models.Application, error)

func CreateApplicationInternalAPIKey

func CreateApplicationInternalAPIKey(
	ctx context.Context,
	applicationID pgtype.UUID,
) (*models.ApiKey, error)

func CreateCohereModelParameters

func CreateCohereModelParameters() *json.RawMessage

func CreateCoherePromptConfig

func CreateCoherePromptConfig(
	ctx context.Context,
	applicationID pgtype.UUID,
) (*models.PromptConfig, error)

func CreateOpenAIModelParameters

func CreateOpenAIModelParameters() *json.RawMessage

func CreateOpenAIPromptConfig

func CreateOpenAIPromptConfig(
	ctx context.Context,
	applicationID pgtype.UUID,
) (*models.PromptConfig, error)

func CreateOpenAIPromptMessages

func CreateOpenAIPromptMessages(
	systemMessage string,
	userMessage string,
	templateVariables *[]string,
) *json.RawMessage

func CreateProject

func CreateProject(ctx context.Context) (*models.Project, error)

func CreatePromptRequestRecord

func CreatePromptRequestRecord(
	ctx context.Context,
	promptConfigID pgtype.UUID,
) (*models.PromptRequestRecord, error)

func CreateProviderAPIKey

func CreateProviderAPIKey(
	ctx context.Context,
	projectID pgtype.UUID,
	apiKey string,
	modelVendor models.ModelVendor,
) (models.ProviderKey, error)

func CreateProviderPricingModels

func CreateProviderPricingModels(
	ctx context.Context,
) error

func CreateUserAccount

func CreateUserAccount(ctx context.Context) (*models.UserAccount, error)

func RandomString

func RandomString(length int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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