textv1

package
v0.0.0-...-4f55759 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package textv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	MinimaxService_ChatCompletions_FullMethodName      = "/minimax.text.v1.MinimaxService/ChatCompletions"
	MinimaxService_ChatCompletionStream_FullMethodName = "/minimax.text.v1.MinimaxService/ChatCompletionStream"
)

Variables

View Source
var File_minimax_text_v1_chat_proto protoreflect.FileDescriptor
View Source
var File_minimax_text_v1_chat_service_proto protoreflect.FileDescriptor
View Source
var MinimaxService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "minimax.text.v1.MinimaxService",
	HandlerType: (*MinimaxServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ChatCompletions",
			Handler:    _MinimaxService_ChatCompletions_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ChatCompletionStream",
			Handler:       _MinimaxService_ChatCompletionStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "minimax/text/v1/chat_service.proto",
}

MinimaxService_ServiceDesc is the grpc.ServiceDesc for MinimaxService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMinimaxServiceHandler

func RegisterMinimaxServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMinimaxServiceHandler registers the http handlers for service MinimaxService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMinimaxServiceHandlerClient

func RegisterMinimaxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MinimaxServiceClient) error

RegisterMinimaxServiceHandlerClient registers the http handlers for service MinimaxService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MinimaxServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MinimaxServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MinimaxServiceClient" to call the correct interceptors.

func RegisterMinimaxServiceHandlerFromEndpoint

func RegisterMinimaxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMinimaxServiceHandlerFromEndpoint is same as RegisterMinimaxServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMinimaxServiceHandlerServer

func RegisterMinimaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MinimaxServiceServer) error

RegisterMinimaxServiceHandlerServer registers the http handlers for service MinimaxService to "mux". UnaryRPC :call MinimaxServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMinimaxServiceHandlerFromEndpoint instead.

func RegisterMinimaxServiceServer

func RegisterMinimaxServiceServer(s grpc.ServiceRegistrar, srv MinimaxServiceServer)

Types

type BaseResponse

type BaseResponse struct {

	// 状态码
	//
	//	1000,未知错误
	//	1001,超时
	//	1002,触发限流
	//	1004,鉴权失败
	//	1008,余额不足
	//	1013,服务内部错误
	//	1027,输出内容严重违规
	//	2013,输入格式信息不正常
	StatusCode int64 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// 错误详情
	StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"`
	// contains filtered or unexported fields
}

func (*BaseResponse) Descriptor deprecated

func (*BaseResponse) Descriptor() ([]byte, []int)

Deprecated: Use BaseResponse.ProtoReflect.Descriptor instead.

func (*BaseResponse) GetStatusCode

func (x *BaseResponse) GetStatusCode() int64

func (*BaseResponse) GetStatusMsg

func (x *BaseResponse) GetStatusMsg() string

func (*BaseResponse) ProtoMessage

func (*BaseResponse) ProtoMessage()

func (*BaseResponse) ProtoReflect

func (x *BaseResponse) ProtoReflect() protoreflect.Message

func (*BaseResponse) Reset

func (x *BaseResponse) Reset()

func (*BaseResponse) String

func (x *BaseResponse) String() string

type BotSetting

type BotSetting struct {
	BotName string `protobuf:"bytes,1,opt,name=bot_name,json=botName,proto3" json:"bot_name,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*BotSetting) Descriptor deprecated

func (*BotSetting) Descriptor() ([]byte, []int)

Deprecated: Use BotSetting.ProtoReflect.Descriptor instead.

func (*BotSetting) GetBotName

func (x *BotSetting) GetBotName() string

func (*BotSetting) GetContent

func (x *BotSetting) GetContent() string

func (*BotSetting) ProtoMessage

func (*BotSetting) ProtoMessage()

func (*BotSetting) ProtoReflect

func (x *BotSetting) ProtoReflect() protoreflect.Message

func (*BotSetting) Reset

func (x *BotSetting) Reset()

func (*BotSetting) String

func (x *BotSetting) String() string

type ChatCompletionsRequest

type ChatCompletionsRequest struct {

	// 目前只能取以下一个值
	// abab5-chat
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// 否 对回复添加情绪预测。注意,当with_emotion=true,且请求上下文(输入和输出文本)长时,请求会显著变慢,达到数秒。
	WithEmotion bool `protobuf:"varint,2,opt,name=with_emotion,json=withEmotion,proto3" json:"with_emotion,omitempty"`
	// 否 	是否以流式接口的形式返回数据,默认false。
	Stream bool `protobuf:"varint,3,opt,name=stream,proto3" json:"stream,omitempty"`
	// 是否通过流式分批返回结果。如果设置为true,结果分批返回,以一个换行为分割符;若希望使用标准SSE响应格式,可以设置use_standard_sse参数为true。默认false
	UseStandardSse bool `protobuf:"varint,4,opt,name=use_standard_sse,json=useStandardSse,proto3" json:"use_standard_sse,omitempty"`
	// 生成多少个结果;不设置默认为1,最大不超过4。 由于beam_width生成多个结果,会消耗更多token。 默认1
	BeamWidth int32 `protobuf:"varint,5,opt,name=beam_width,json=beamWidth,proto3" json:"beam_width,omitempty"`
	// 对话背景、人物或功能设定 长度上限为4096个token,不可为空
	Prompt string `protobuf:"bytes,6,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// 对话上下文信息。说明:"user_name": "我", "bot_name": "专家"
	RoleMeta *RoleMeta `protobuf:"bytes,7,opt,name=role_meta,json=roleMeta,proto3" json:"role_meta,omitempty"`
	// 是 	聊天上下文信息。说明:
	// (1)messages成员不能为空,1个成员表示单轮对话,多个成员表示多轮对话。
	// (2)最后一个message为当前请求的信息,前面的message为历史对话信息。
	// (3)必须为奇数个成员,成员中message的role必须依次为user、assistant。
	// (4)最后一个message的content长度(即此轮对话的问题)不能超过2000个字符;如果messages中content总长度大于2000字符,系统会依次遗忘最早的历史会话,直到content的总长度不超过2000个字符。
	Messages    []*Message `protobuf:"bytes,8,rep,name=messages,proto3" json:"messages,omitempty"`
	Temperature float32    `protobuf:"fixed32,9,opt,name=temperature,proto3" json:"temperature,omitempty"`
	TopP        float32    `protobuf:"fixed32,10,opt,name=top_p,json=topP,proto3" json:"top_p,omitempty"`
	// 对输出中易涉及隐私问题的文本信息进行脱敏,目前包括但不限于邮箱、域名、链接、证件号、家庭住址等,默认false,即开启脱敏 默认false
	SkipInfoMask     bool                  `protobuf:"varint,11,opt,name=skip_info_mask,json=skipInfoMask,proto3" json:"skip_info_mask,omitempty"`
	TokensToGenerate int32                 `protobuf:"varint,12,opt,name=tokens_to_generate,json=tokensToGenerate,proto3" json:"tokens_to_generate,omitempty"`
	BotSetting       []*BotSetting         `protobuf:"bytes,13,rep,name=bot_setting,json=botSetting,proto3" json:"bot_setting,omitempty"`
	ReplyConstraints *ReplyConstraints     `protobuf:"bytes,14,opt,name=reply_constraints,json=replyConstraints,proto3" json:"reply_constraints,omitempty"`
	Functions        []*FunctionDefinition `protobuf:"bytes,15,rep,name=functions,proto3" json:"functions,omitempty"`
	SampleMessages   []*Message            `protobuf:"bytes,16,rep,name=sample_messages,json=sampleMessages,proto3" json:"sample_messages,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatCompletionsRequest) Descriptor deprecated

func (*ChatCompletionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChatCompletionsRequest.ProtoReflect.Descriptor instead.

func (*ChatCompletionsRequest) GetBeamWidth

func (x *ChatCompletionsRequest) GetBeamWidth() int32

func (*ChatCompletionsRequest) GetBotSetting

func (x *ChatCompletionsRequest) GetBotSetting() []*BotSetting

func (*ChatCompletionsRequest) GetFunctions

func (x *ChatCompletionsRequest) GetFunctions() []*FunctionDefinition

func (*ChatCompletionsRequest) GetMessages

func (x *ChatCompletionsRequest) GetMessages() []*Message

func (*ChatCompletionsRequest) GetModel

func (x *ChatCompletionsRequest) GetModel() string

func (*ChatCompletionsRequest) GetPrompt

func (x *ChatCompletionsRequest) GetPrompt() string

func (*ChatCompletionsRequest) GetReplyConstraints

func (x *ChatCompletionsRequest) GetReplyConstraints() *ReplyConstraints

func (*ChatCompletionsRequest) GetRoleMeta

func (x *ChatCompletionsRequest) GetRoleMeta() *RoleMeta

func (*ChatCompletionsRequest) GetSampleMessages

func (x *ChatCompletionsRequest) GetSampleMessages() []*Message

func (*ChatCompletionsRequest) GetSkipInfoMask

func (x *ChatCompletionsRequest) GetSkipInfoMask() bool

func (*ChatCompletionsRequest) GetStream

func (x *ChatCompletionsRequest) GetStream() bool

func (*ChatCompletionsRequest) GetTemperature

func (x *ChatCompletionsRequest) GetTemperature() float32

func (*ChatCompletionsRequest) GetTokensToGenerate

func (x *ChatCompletionsRequest) GetTokensToGenerate() int32

func (*ChatCompletionsRequest) GetTopP

func (x *ChatCompletionsRequest) GetTopP() float32

func (*ChatCompletionsRequest) GetUseStandardSse

func (x *ChatCompletionsRequest) GetUseStandardSse() bool

func (*ChatCompletionsRequest) GetWithEmotion

func (x *ChatCompletionsRequest) GetWithEmotion() bool

func (*ChatCompletionsRequest) ProtoMessage

func (*ChatCompletionsRequest) ProtoMessage()

func (*ChatCompletionsRequest) ProtoReflect

func (x *ChatCompletionsRequest) ProtoReflect() protoreflect.Message

func (*ChatCompletionsRequest) Reset

func (x *ChatCompletionsRequest) Reset()

func (*ChatCompletionsRequest) String

func (x *ChatCompletionsRequest) String() string

type ChatCompletionsResponse

type ChatCompletionsResponse struct {

	// 请求发起时间
	Created int64 `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"`
	// 请求指定的模型
	Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// 推荐的最好结果
	Reply string `protobuf:"bytes,3,opt,name=reply,proto3" json:"reply,omitempty"`
	// 所有结果
	Choices []*Choice `protobuf:"bytes,4,rep,name=choices,proto3" json:"choices,omitempty"`
	// tokens数使用情况
	Usage *Usage `protobuf:"bytes,5,opt,name=usage,proto3" json:"usage,omitempty"`
	// 输入命中敏感词
	InputSensitive bool `protobuf:"varint,6,opt,name=input_sensitive,json=inputSensitive,proto3" json:"input_sensitive,omitempty"`
	// 输出命中敏感词
	OutputSensitive bool `protobuf:"varint,7,opt,name=output_sensitive,json=outputSensitive,proto3" json:"output_sensitive,omitempty"`
	// 错误状态码和详情
	BaseResp     *BaseResponse `protobuf:"bytes,8,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"`
	FunctionCall *FunctionCall `protobuf:"bytes,9,opt,name=function_call,json=functionCall,proto3" json:"function_call,omitempty"`
	TraceId      string        `protobuf:"bytes,10,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatCompletionsResponse) Descriptor deprecated

func (*ChatCompletionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChatCompletionsResponse.ProtoReflect.Descriptor instead.

func (*ChatCompletionsResponse) GetBaseResp

func (x *ChatCompletionsResponse) GetBaseResp() *BaseResponse

func (*ChatCompletionsResponse) GetChoices

func (x *ChatCompletionsResponse) GetChoices() []*Choice

func (*ChatCompletionsResponse) GetCreated

func (x *ChatCompletionsResponse) GetCreated() int64

func (*ChatCompletionsResponse) GetFunctionCall

func (x *ChatCompletionsResponse) GetFunctionCall() *FunctionCall

func (*ChatCompletionsResponse) GetInputSensitive

func (x *ChatCompletionsResponse) GetInputSensitive() bool

func (*ChatCompletionsResponse) GetModel

func (x *ChatCompletionsResponse) GetModel() string

func (*ChatCompletionsResponse) GetOutputSensitive

func (x *ChatCompletionsResponse) GetOutputSensitive() bool

func (*ChatCompletionsResponse) GetReply

func (x *ChatCompletionsResponse) GetReply() string

func (*ChatCompletionsResponse) GetTraceId

func (x *ChatCompletionsResponse) GetTraceId() string

func (*ChatCompletionsResponse) GetUsage

func (x *ChatCompletionsResponse) GetUsage() *Usage

func (*ChatCompletionsResponse) ProtoMessage

func (*ChatCompletionsResponse) ProtoMessage()

func (*ChatCompletionsResponse) ProtoReflect

func (x *ChatCompletionsResponse) ProtoReflect() protoreflect.Message

func (*ChatCompletionsResponse) Reset

func (x *ChatCompletionsResponse) Reset()

func (*ChatCompletionsResponse) String

func (x *ChatCompletionsResponse) String() string

type Choice

type Choice struct {

	// 文本结果
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// 排名
	Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// 分数
	Logprobes float64 `protobuf:"fixed64,3,opt,name=logprobes,proto3" json:"logprobes,omitempty"`
	// 结束原因,枚举值
	// stop:API返回了模型生成的完整结果
	// length:模型生成结果超过tokens_to_generate的长度,内容被截断
	FinishReason string `protobuf:"bytes,4,opt,name=finish_reason,json=finishReason,proto3" json:"finish_reason,omitempty"`
	// 回复文本情绪预测
	// 取值为以下八者其一 伤心 尴尬 开心 惊讶 愤怒 慌张 疑惑 自然
	Emotion string `protobuf:"bytes,5,opt,name=emotion,proto3" json:"emotion,omitempty"`
	// 当request.stream为true,处于流式模式下,回复文本通过delta给出
	Delta    string     `protobuf:"bytes,6,opt,name=delta,proto3" json:"delta,omitempty"`
	Messages []*Message `protobuf:"bytes,7,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*Choice) Descriptor deprecated

func (*Choice) Descriptor() ([]byte, []int)

Deprecated: Use Choice.ProtoReflect.Descriptor instead.

func (*Choice) GetDelta

func (x *Choice) GetDelta() string

func (*Choice) GetEmotion

func (x *Choice) GetEmotion() string

func (*Choice) GetFinishReason

func (x *Choice) GetFinishReason() string

func (*Choice) GetIndex

func (x *Choice) GetIndex() int64

func (*Choice) GetLogprobes

func (x *Choice) GetLogprobes() float64

func (*Choice) GetMessages

func (x *Choice) GetMessages() []*Message

func (*Choice) GetText

func (x *Choice) GetText() string

func (*Choice) ProtoMessage

func (*Choice) ProtoMessage()

func (*Choice) ProtoReflect

func (x *Choice) ProtoReflect() protoreflect.Message

func (*Choice) Reset

func (x *Choice) Reset()

func (*Choice) String

func (x *Choice) String() string

type FunctionCall

type FunctionCall struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Arguments string `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

func (*FunctionCall) Descriptor deprecated

func (*FunctionCall) Descriptor() ([]byte, []int)

Deprecated: Use FunctionCall.ProtoReflect.Descriptor instead.

func (*FunctionCall) GetArguments

func (x *FunctionCall) GetArguments() string

func (*FunctionCall) GetName

func (x *FunctionCall) GetName() string

func (*FunctionCall) ProtoMessage

func (*FunctionCall) ProtoMessage()

func (*FunctionCall) ProtoReflect

func (x *FunctionCall) ProtoReflect() protoreflect.Message

func (*FunctionCall) Reset

func (x *FunctionCall) Reset()

func (*FunctionCall) String

func (x *FunctionCall) String() string

type FunctionDefinition

type FunctionDefinition struct {
	Name        string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string      `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Parameters  *Parameters `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

func (*FunctionDefinition) Descriptor deprecated

func (*FunctionDefinition) Descriptor() ([]byte, []int)

Deprecated: Use FunctionDefinition.ProtoReflect.Descriptor instead.

func (*FunctionDefinition) GetDescription

func (x *FunctionDefinition) GetDescription() string

func (*FunctionDefinition) GetName

func (x *FunctionDefinition) GetName() string

func (*FunctionDefinition) GetParameters

func (x *FunctionDefinition) GetParameters() *Parameters

func (*FunctionDefinition) ProtoMessage

func (*FunctionDefinition) ProtoMessage()

func (*FunctionDefinition) ProtoReflect

func (x *FunctionDefinition) ProtoReflect() protoreflect.Message

func (*FunctionDefinition) Reset

func (x *FunctionDefinition) Reset()

func (*FunctionDefinition) String

func (x *FunctionDefinition) String() string

type Message

type Message struct {

	// 当前支持以下:
	// USER: 表示用户
	// BOT: 表示对话助手
	SenderType string `protobuf:"bytes,1,opt,name=sender_type,json=senderType,proto3" json:"sender_type,omitempty"`
	// 对话内容,不能为空。
	Text         string        `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	SenderName   string        `protobuf:"bytes,3,opt,name=sender_name,json=senderName,proto3" json:"sender_name,omitempty"`
	FunctionCall *FunctionCall `protobuf:"bytes,4,opt,name=function_call,json=functionCall,proto3" json:"function_call,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetFunctionCall

func (x *Message) GetFunctionCall() *FunctionCall

func (*Message) GetSenderName

func (x *Message) GetSenderName() string

func (*Message) GetSenderType

func (x *Message) GetSenderType() string

func (*Message) GetText

func (x *Message) GetText() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MinimaxServiceClient

type MinimaxServiceClient interface {
	ChatCompletions(ctx context.Context, in *ChatCompletionsRequest, opts ...grpc.CallOption) (*ChatCompletionsResponse, error)
	ChatCompletionStream(ctx context.Context, in *ChatCompletionsRequest, opts ...grpc.CallOption) (MinimaxService_ChatCompletionStreamClient, error)
}

MinimaxServiceClient is the client API for MinimaxService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MinimaxServiceServer

type MinimaxServiceServer interface {
	ChatCompletions(context.Context, *ChatCompletionsRequest) (*ChatCompletionsResponse, error)
	ChatCompletionStream(*ChatCompletionsRequest, MinimaxService_ChatCompletionStreamServer) error
}

MinimaxServiceServer is the server API for MinimaxService service. All implementations should embed UnimplementedMinimaxServiceServer for forward compatibility

type MinimaxService_ChatCompletionStreamClient

type MinimaxService_ChatCompletionStreamClient interface {
	Recv() (*ChatCompletionsResponse, error)
	grpc.ClientStream
}

type MinimaxService_ChatCompletionStreamServer

type MinimaxService_ChatCompletionStreamServer interface {
	Send(*ChatCompletionsResponse) error
	grpc.ServerStream
}

type Parameters

type Parameters struct {
	Title       string                 `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Type        string                 `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Description string                 `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Properties  map[string]*Parameters `` /* 161-byte string literal not displayed */
	Enum        []string               `protobuf:"bytes,5,rep,name=enum,proto3" json:"enum,omitempty"`
	Required    []string               `protobuf:"bytes,6,rep,name=required,proto3" json:"required,omitempty"`
	Items       *Parameters            `protobuf:"bytes,7,opt,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameters) Descriptor deprecated

func (*Parameters) Descriptor() ([]byte, []int)

Deprecated: Use Parameters.ProtoReflect.Descriptor instead.

func (*Parameters) GetDescription

func (x *Parameters) GetDescription() string

func (*Parameters) GetEnum

func (x *Parameters) GetEnum() []string

func (*Parameters) GetItems

func (x *Parameters) GetItems() *Parameters

func (*Parameters) GetProperties

func (x *Parameters) GetProperties() map[string]*Parameters

func (*Parameters) GetRequired

func (x *Parameters) GetRequired() []string

func (*Parameters) GetTitle

func (x *Parameters) GetTitle() string

func (*Parameters) GetType

func (x *Parameters) GetType() string

func (*Parameters) ProtoMessage

func (*Parameters) ProtoMessage()

func (*Parameters) ProtoReflect

func (x *Parameters) ProtoReflect() protoreflect.Message

func (*Parameters) Reset

func (x *Parameters) Reset()

func (*Parameters) String

func (x *Parameters) String() string

type ReplyConstraints

type ReplyConstraints struct {
	SenderType string `protobuf:"bytes,1,opt,name=sender_type,json=senderType,proto3" json:"sender_type,omitempty"`
	SenderName string `protobuf:"bytes,2,opt,name=sender_name,json=senderName,proto3" json:"sender_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyConstraints) Descriptor deprecated

func (*ReplyConstraints) Descriptor() ([]byte, []int)

Deprecated: Use ReplyConstraints.ProtoReflect.Descriptor instead.

func (*ReplyConstraints) GetSenderName

func (x *ReplyConstraints) GetSenderName() string

func (*ReplyConstraints) GetSenderType

func (x *ReplyConstraints) GetSenderType() string

func (*ReplyConstraints) ProtoMessage

func (*ReplyConstraints) ProtoMessage()

func (*ReplyConstraints) ProtoReflect

func (x *ReplyConstraints) ProtoReflect() protoreflect.Message

func (*ReplyConstraints) Reset

func (x *ReplyConstraints) Reset()

func (*ReplyConstraints) String

func (x *ReplyConstraints) String() string

type RoleMeta

type RoleMeta struct {
	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	BotName  string `protobuf:"bytes,2,opt,name=bot_name,json=botName,proto3" json:"bot_name,omitempty"`
	// contains filtered or unexported fields
}

func (*RoleMeta) Descriptor deprecated

func (*RoleMeta) Descriptor() ([]byte, []int)

Deprecated: Use RoleMeta.ProtoReflect.Descriptor instead.

func (*RoleMeta) GetBotName

func (x *RoleMeta) GetBotName() string

func (*RoleMeta) GetUserName

func (x *RoleMeta) GetUserName() string

func (*RoleMeta) ProtoMessage

func (*RoleMeta) ProtoMessage()

func (*RoleMeta) ProtoReflect

func (x *RoleMeta) ProtoReflect() protoreflect.Message

func (*RoleMeta) Reset

func (x *RoleMeta) Reset()

func (*RoleMeta) String

func (x *RoleMeta) String() string

type UnimplementedMinimaxServiceServer

type UnimplementedMinimaxServiceServer struct {
}

UnimplementedMinimaxServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedMinimaxServiceServer) ChatCompletions

type UnsafeMinimaxServiceServer

type UnsafeMinimaxServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeMinimaxServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MinimaxServiceServer will result in compilation errors.

type Usage

type Usage struct {

	// 消耗tokens总数,包括输入和输出;具体计算方式为输入tokens + 最大输出tokens x beam_width。
	// 假设beam_width为2,输入tokens为100,输出结果分别为20tokens和30tokens,最终消耗160tokens
	TotalTokens int64 `protobuf:"varint,1,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*Usage) Descriptor deprecated

func (*Usage) Descriptor() ([]byte, []int)

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) GetTotalTokens

func (x *Usage) GetTotalTokens() int64

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect

func (x *Usage) ProtoReflect() protoreflect.Message

func (*Usage) Reset

func (x *Usage) Reset()

func (*Usage) String

func (x *Usage) String() string

Jump to

Keyboard shortcuts

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