Documentation
¶
Index ¶
Constants ¶
View Source
const FinishReasonLength = "length"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatCompletionRequest ¶
type ChatCompletionResponse ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error GptError `json:"error,omitempty"`
}
type Wrapper ¶
type Wrapper interface { //Call todo in a clean way, to handle both internal and external wrappers required splitting Call into two functions build the request and send the request Call(auth string, metaData *message.MetaData, request *ChatCompletionRequest) (*ChatCompletionResponse, error) SetupCall(messages []message.Message) Close() error }
func NewWrapperFactory ¶
func NewWrapperImpl ¶
type WrapperImpl ¶
type WrapperImpl struct {
// contains filtered or unexported fields
}
func (*WrapperImpl) Call ¶
func (w *WrapperImpl) Call(cxAuth string, metaData *message.MetaData, request *ChatCompletionRequest) (*ChatCompletionResponse, error)
func (*WrapperImpl) Close ¶
func (w *WrapperImpl) Close() error
func (*WrapperImpl) SetupCall ¶
func (w *WrapperImpl) SetupCall(messages []message.Message)
type WrapperInternalImpl ¶
type WrapperInternalImpl struct {
// contains filtered or unexported fields
}
func (*WrapperInternalImpl) Call ¶
func (w *WrapperInternalImpl) Call(_ string, metaData *message.MetaData, request *ChatCompletionRequest) (*ChatCompletionResponse, error)
func (*WrapperInternalImpl) Close ¶
func (w *WrapperInternalImpl) Close() error
func (*WrapperInternalImpl) SetupCall ¶
func (w *WrapperInternalImpl) SetupCall(messages []message.Message)
Click to show internal directories.
Click to hide internal directories.