gpt

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChatResponse_BaseResp_DEFAULT *base.BaseResponse

Functions

This section is empty.

Types

type ChatRequest

type ChatRequest struct {
	Content string `thrift:"content,1" form:"content" json:"content" query:"content"`
}
var GptServiceChatArgs_Req_DEFAULT *ChatRequest

func NewChatRequest

func NewChatRequest() *ChatRequest

func (*ChatRequest) GetContent

func (p *ChatRequest) GetContent() (v string)

func (*ChatRequest) Read

func (p *ChatRequest) Read(iprot thrift.TProtocol) (err error)

func (*ChatRequest) ReadField1

func (p *ChatRequest) ReadField1(iprot thrift.TProtocol) error

func (*ChatRequest) String

func (p *ChatRequest) String() string

func (*ChatRequest) Write

func (p *ChatRequest) Write(oprot thrift.TProtocol) (err error)

type ChatResponse

type ChatResponse struct {
	BaseResp *base.BaseResponse `thrift:"base_resp,1" form:"base_resp" json:"base_resp" query:"base_resp"`
	Content  string             `thrift:"content,2" form:"content" json:"content" query:"content"`
}
var GptServiceChatResult_Success_DEFAULT *ChatResponse

func NewChatResponse

func NewChatResponse() *ChatResponse

func (*ChatResponse) GetBaseResp

func (p *ChatResponse) GetBaseResp() (v *base.BaseResponse)

func (*ChatResponse) GetContent

func (p *ChatResponse) GetContent() (v string)

func (*ChatResponse) IsSetBaseResp

func (p *ChatResponse) IsSetBaseResp() bool

func (*ChatResponse) Read

func (p *ChatResponse) Read(iprot thrift.TProtocol) (err error)

func (*ChatResponse) ReadField1

func (p *ChatResponse) ReadField1(iprot thrift.TProtocol) error

func (*ChatResponse) ReadField2

func (p *ChatResponse) ReadField2(iprot thrift.TProtocol) error

func (*ChatResponse) String

func (p *ChatResponse) String() string

func (*ChatResponse) Write

func (p *ChatResponse) Write(oprot thrift.TProtocol) (err error)

type GptService

type GptService interface {
	Chat(ctx context.Context, req *ChatRequest) (r *ChatResponse, err error)
}

type GptServiceChatArgs

type GptServiceChatArgs struct {
	Req *ChatRequest `thrift:"req,1"`
}

func NewGptServiceChatArgs

func NewGptServiceChatArgs() *GptServiceChatArgs

func (*GptServiceChatArgs) GetReq

func (p *GptServiceChatArgs) GetReq() (v *ChatRequest)

func (*GptServiceChatArgs) IsSetReq

func (p *GptServiceChatArgs) IsSetReq() bool

func (*GptServiceChatArgs) Read

func (p *GptServiceChatArgs) Read(iprot thrift.TProtocol) (err error)

func (*GptServiceChatArgs) ReadField1

func (p *GptServiceChatArgs) ReadField1(iprot thrift.TProtocol) error

func (*GptServiceChatArgs) String

func (p *GptServiceChatArgs) String() string

func (*GptServiceChatArgs) Write

func (p *GptServiceChatArgs) Write(oprot thrift.TProtocol) (err error)

type GptServiceChatResult

type GptServiceChatResult struct {
	Success *ChatResponse `thrift:"success,0,optional"`
}

func NewGptServiceChatResult

func NewGptServiceChatResult() *GptServiceChatResult

func (*GptServiceChatResult) GetSuccess

func (p *GptServiceChatResult) GetSuccess() (v *ChatResponse)

func (*GptServiceChatResult) IsSetSuccess

func (p *GptServiceChatResult) IsSetSuccess() bool

func (*GptServiceChatResult) Read

func (p *GptServiceChatResult) Read(iprot thrift.TProtocol) (err error)

func (*GptServiceChatResult) ReadField0

func (p *GptServiceChatResult) ReadField0(iprot thrift.TProtocol) error

func (*GptServiceChatResult) String

func (p *GptServiceChatResult) String() string

func (*GptServiceChatResult) Write

func (p *GptServiceChatResult) Write(oprot thrift.TProtocol) (err error)

type GptServiceClient

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

func NewGptServiceClient

func NewGptServiceClient(c thrift.TClient) *GptServiceClient

func NewGptServiceClientProtocol

func NewGptServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *GptServiceClient

func (*GptServiceClient) Chat

func (p *GptServiceClient) Chat(ctx context.Context, req *ChatRequest) (r *ChatResponse, err error)

func (*GptServiceClient) Client_

func (p *GptServiceClient) Client_() thrift.TClient

type GptServiceProcessor

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

func NewGptServiceProcessor

func NewGptServiceProcessor(handler GptService) *GptServiceProcessor

func (*GptServiceProcessor) AddToProcessorMap

func (p *GptServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*GptServiceProcessor) GetProcessorFunction

func (p *GptServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*GptServiceProcessor) Process

func (p *GptServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*GptServiceProcessor) ProcessorMap

func (p *GptServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

Jump to

Keyboard shortcuts

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