openai

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatEndpoint

func ChatEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx) error

func ComputeChoices

func ComputeChoices(
	req *schema.OpenAIRequest,
	predInput string,
	config *config.Config,
	o *options.Option,
	loader *model.ModelLoader,
	cb func(string, *[]schema.Choice),
	tokenCallback func(string, backend.TokenUsage) bool) ([]schema.Choice, backend.TokenUsage, error)

func EditEndpoint

func EditEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx) error

func ImageEndpoint

func ImageEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx) error

*

curl http://localhost:8080/v1/images/generations \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "512x512"
  }'

*

func ListModelsEndpoint

func ListModelsEndpoint(loader *model.ModelLoader, cm *config.ConfigLoader) func(ctx *fiber.Ctx) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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