internal

package
v0.0.0-...-e9a2108 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrModelRequired = errors.New("model is required")
	ErrNotSupport    = errors.New("not support")
)

Functions

This section is empty.

Types

type OpenAIModelResponse

type OpenAIModelResponse struct {
	Object string         `json:"object"`
	Data   []openai.Model `json:"data"`
}

type Request

type Request struct {
	Method      string              `json:"method,omitempty"`
	URL         string              `json:"url,omitempty"`
	Path        string              `json:"path,omitempty"`
	QueryParams map[string][]string `json:"query_params,omitempty"`
	Body        []byte              `json:"body,omitempty"`
}

Request Proxy request object

type Server

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

func NewServer

func NewServer(conf *config.Config) (*Server, error)

func (*Server) Dispatch

func (s *Server) Dispatch(w http.ResponseWriter, r *http.Request) error

Dispatch Request distribution implementation logic

func (*Server) EvalTest

func (s *Server) EvalTest(model string)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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