openaiserver

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 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 Handler

type Handler struct {
	ModelProxy *modelproxy.Handler
	K8sClient  client.Client
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(k8sClient client.Client, modelProxy *modelproxy.Handler) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Model

type Model struct {
	ID      string `json:"id"`
	Created int64  `json:"created"`
	Object  string `json:"object"`
	OwnedBy string `json:"owned_by"`

	Features []kubeaiv1.ModelFeature `json:"features,omitempty"`
}

Model is a struct that represents a model object from the OpenAI API.

func (*Model) FromK8sModel

func (m *Model) FromK8sModel(model *kubeaiv1.Model)

Jump to

Keyboard shortcuts

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