endpoint

package
v0.0.0-...-aa8845d Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeEndpointOfChat

func MakeEndpointOfChat(s api.LLM) endpoint.Endpoint

MakeEndpointOfChat creates the endpoint for s.Chat.

func ValidateChatRequest

func ValidateChatRequest(newSchema func(*ChatRequest) validating.Schema) httpoption.Validator

ValidateChatRequest creates a validator for ChatRequest.

Types

type ChatRequest

type ChatRequest struct {
	Req *api.Request `json:"req"`
}

type ChatResponse

type ChatResponse struct {
	Resp *api.Response `json:"resp"`
	Err  error         `json:"-"`
}

func (*ChatResponse) Body

func (r *ChatResponse) Body() interface{}

func (*ChatResponse) Failed

func (r *ChatResponse) Failed() error

Failed implements endpoint.Failer.

Jump to

Keyboard shortcuts

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