api

package
v1.0.131 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proxy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BypassIdentity added in v1.0.128

type BypassIdentity struct {
	AccountId            uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	IdentityId           uint64 `protobuf:"varint,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"`
	IdentityType         string `protobuf:"bytes,3,opt,name=identity_type,json=identityType,proto3" json:"identity_type,omitempty"`
	IdentityName         string `protobuf:"bytes,4,opt,name=identity_name,json=identityName,proto3" json:"identity_name,omitempty"`
	Channel              string `protobuf:"bytes,5,opt,name=channel,proto3" json:"channel,omitempty"`
	OriginalIdentityType string `protobuf:"bytes,6,opt,name=original_identity_type,json=originalIdentityType,proto3" json:"original_identity_type,omitempty"`
	// contains filtered or unexported fields
}

func (*BypassIdentity) Descriptor deprecated added in v1.0.128

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

Deprecated: Use BypassIdentity.ProtoReflect.Descriptor instead.

func (*BypassIdentity) GetAccountId added in v1.0.128

func (x *BypassIdentity) GetAccountId() uint64

func (*BypassIdentity) GetChannel added in v1.0.128

func (x *BypassIdentity) GetChannel() string

func (*BypassIdentity) GetIdentityId added in v1.0.128

func (x *BypassIdentity) GetIdentityId() uint64

func (*BypassIdentity) GetIdentityName added in v1.0.128

func (x *BypassIdentity) GetIdentityName() string

func (*BypassIdentity) GetIdentityType added in v1.0.128

func (x *BypassIdentity) GetIdentityType() string

func (*BypassIdentity) GetOriginalIdentityType added in v1.0.128

func (x *BypassIdentity) GetOriginalIdentityType() string

func (*BypassIdentity) ProtoMessage added in v1.0.128

func (*BypassIdentity) ProtoMessage()

func (*BypassIdentity) ProtoReflect added in v1.0.128

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

func (*BypassIdentity) Reset added in v1.0.128

func (x *BypassIdentity) Reset()

func (*BypassIdentity) String added in v1.0.128

func (x *BypassIdentity) String() string

type CertReq added in v1.0.113

type CertReq struct {
	Model *Model `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*CertReq) Descriptor deprecated added in v1.0.113

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

Deprecated: Use CertReq.ProtoReflect.Descriptor instead.

func (*CertReq) GetModel added in v1.0.113

func (x *CertReq) GetModel() *Model

func (*CertReq) ProtoMessage added in v1.0.113

func (*CertReq) ProtoMessage()

func (*CertReq) ProtoReflect added in v1.0.121

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

func (*CertReq) Reset added in v1.0.113

func (x *CertReq) Reset()

func (*CertReq) String added in v1.0.113

func (x *CertReq) String() string

type CertResp added in v1.0.113

type CertResp struct {
	Model *Model `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	Cert  string `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert,omitempty"`
	// contains filtered or unexported fields
}

func (*CertResp) Descriptor deprecated added in v1.0.113

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

Deprecated: Use CertResp.ProtoReflect.Descriptor instead.

func (*CertResp) GetCert added in v1.0.113

func (x *CertResp) GetCert() string

func (*CertResp) GetModel added in v1.0.113

func (x *CertResp) GetModel() *Model

func (*CertResp) ProtoMessage added in v1.0.113

func (*CertResp) ProtoMessage()

func (*CertResp) ProtoReflect added in v1.0.121

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

func (*CertResp) Reset added in v1.0.113

func (x *CertResp) Reset()

func (*CertResp) String added in v1.0.113

func (x *CertResp) String() string

type ChatReq

type ChatReq struct {

	// Used model for inference
	Model *Model `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// User input prompt
	Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	// API specific parameters
	Parameters *Parameters `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// Whether use stream mode, if set, partial message deltas will be sent as
	// data-only server-sent events as they become available
	// The stream will be terminated by a data: [DONE]
	Stream bool `protobuf:"varint,4,opt,name=stream,proto3" json:"stream,omitempty"`
	// Unified request id
	ReqId string `protobuf:"bytes,5,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	// symmetric key to encrypt messages, the key itself is encrypted
	// with model's public key.
	CryptoToken string `protobuf:"bytes,6,opt,name=crypto_token,json=cryptoToken,proto3" json:"crypto_token,omitempty"` //[ (api.header) = "Ml-Maas-Crypto-Token" ];
	// list of functions the model may generate json inputs for.
	Functions []*Function `protobuf:"bytes,7,rep,name=functions,proto3" json:"functions,omitempty"`
	// list of plugins the model may call.
	Plugins []string `protobuf:"bytes,8,rep,name=plugins,proto3" json:"plugins,omitempty"`
	// Method supports chat/tokenize/classification
	Method string `protobuf:"bytes,9,opt,name=method,proto3" json:"method,omitempty"`
	// extra info
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ChatReq) Descriptor deprecated

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

Deprecated: Use ChatReq.ProtoReflect.Descriptor instead.

func (*ChatReq) GetCryptoToken added in v1.0.113

func (x *ChatReq) GetCryptoToken() string

func (*ChatReq) GetExtra added in v1.0.121

func (x *ChatReq) GetExtra() map[string]string

func (*ChatReq) GetFunctions added in v1.0.121

func (x *ChatReq) GetFunctions() []*Function

func (*ChatReq) GetMessages

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

func (*ChatReq) GetMethod added in v1.0.123

func (x *ChatReq) GetMethod() string

func (*ChatReq) GetModel

func (x *ChatReq) GetModel() *Model

func (*ChatReq) GetParameters

func (x *ChatReq) GetParameters() *Parameters

func (*ChatReq) GetPlugins added in v1.0.122

func (x *ChatReq) GetPlugins() []string

func (*ChatReq) GetReqId

func (x *ChatReq) GetReqId() string

func (*ChatReq) GetStream

func (x *ChatReq) GetStream() bool

func (*ChatReq) ProtoMessage

func (*ChatReq) ProtoMessage()

func (*ChatReq) ProtoReflect added in v1.0.121

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

func (*ChatReq) Reset

func (x *ChatReq) Reset()

func (*ChatReq) String

func (x *ChatReq) String() string

type ChatResp

type ChatResp struct {

	// Unified request id
	ReqId string `protobuf:"bytes,1,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	// Error if exists for the req
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// The generated result
	Choice *Choice `protobuf:"bytes,3,opt,name=choice,proto3" json:"choice,omitempty"`
	// The tokens usage
	Usage *Usage `protobuf:"bytes,4,opt,name=usage,proto3" json:"usage,omitempty"`
	// extra info
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ChatResp) Descriptor deprecated

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

Deprecated: Use ChatResp.ProtoReflect.Descriptor instead.

func (*ChatResp) GetChoice

func (x *ChatResp) GetChoice() *Choice

func (*ChatResp) GetError

func (x *ChatResp) GetError() *Error

func (*ChatResp) GetExtra added in v1.0.121

func (x *ChatResp) GetExtra() map[string]string

func (*ChatResp) GetReqId

func (x *ChatResp) GetReqId() string

func (*ChatResp) GetUsage

func (x *ChatResp) GetUsage() *Usage

func (*ChatResp) ProtoMessage

func (*ChatResp) ProtoMessage()

func (*ChatResp) ProtoReflect added in v1.0.121

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

func (*ChatResp) Reset

func (x *ChatResp) Reset()

func (*ChatResp) String

func (x *ChatResp) String() string

type Choice

type Choice struct {
	Index        int32     `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Message      *Message  `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	FinishReason string    `protobuf:"bytes,3,opt,name=finish_reason,json=finishReason,proto3" json:"finish_reason,omitempty"`
	Logprobs     *Logprobs `protobuf:"bytes,4,opt,name=logprobs,proto3" json:"logprobs,omitempty"`
	// contains filtered or unexported fields
}

func (*Choice) Descriptor deprecated

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

Deprecated: Use Choice.ProtoReflect.Descriptor instead.

func (*Choice) GetFinishReason

func (x *Choice) GetFinishReason() string

func (*Choice) GetIndex

func (x *Choice) GetIndex() int32

func (*Choice) GetLogprobs

func (x *Choice) GetLogprobs() *Logprobs

func (*Choice) GetMessage

func (x *Choice) GetMessage() *Message

func (*Choice) ProtoMessage

func (*Choice) ProtoMessage()

func (*Choice) ProtoReflect added in v1.0.121

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

func (*Choice) Reset

func (x *Choice) Reset()

func (*Choice) String

func (x *Choice) String() string

type ClassificationReq added in v1.0.123

type ClassificationReq struct {
	Model  *Model   `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	ReqId  string   `protobuf:"bytes,2,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	Query  string   `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
	Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
	// contains filtered or unexported fields
}

func (*ClassificationReq) Descriptor deprecated added in v1.0.123

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

Deprecated: Use ClassificationReq.ProtoReflect.Descriptor instead.

func (*ClassificationReq) GetLabels added in v1.0.123

func (x *ClassificationReq) GetLabels() []string

func (*ClassificationReq) GetModel added in v1.0.123

func (x *ClassificationReq) GetModel() *Model

func (*ClassificationReq) GetQuery added in v1.0.123

func (x *ClassificationReq) GetQuery() string

func (*ClassificationReq) GetReqId added in v1.0.123

func (x *ClassificationReq) GetReqId() string

func (*ClassificationReq) ProtoMessage added in v1.0.123

func (*ClassificationReq) ProtoMessage()

func (*ClassificationReq) ProtoReflect added in v1.0.123

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

func (*ClassificationReq) Reset added in v1.0.123

func (x *ClassificationReq) Reset()

func (*ClassificationReq) String added in v1.0.123

func (x *ClassificationReq) String() string

type ClassificationResp added in v1.0.123

type ClassificationResp struct {
	Label          string                          `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	LabelLogprobos map[string]*LabelLogprobosValue `` /* 191-byte string literal not displayed */
	// The tokens usage
	Usage *Usage `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"`
	// Unified request id
	ReqId string `protobuf:"bytes,4,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	// Error if exists for the req
	Error *Error `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClassificationResp) Descriptor deprecated added in v1.0.123

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

Deprecated: Use ClassificationResp.ProtoReflect.Descriptor instead.

func (*ClassificationResp) GetError added in v1.0.123

func (x *ClassificationResp) GetError() *Error

func (*ClassificationResp) GetLabel added in v1.0.123

func (x *ClassificationResp) GetLabel() string

func (*ClassificationResp) GetLabelLogprobos added in v1.0.123

func (x *ClassificationResp) GetLabelLogprobos() map[string]*LabelLogprobosValue

func (*ClassificationResp) GetReqId added in v1.0.123

func (x *ClassificationResp) GetReqId() string

func (*ClassificationResp) GetUsage added in v1.0.123

func (x *ClassificationResp) GetUsage() *Usage

func (*ClassificationResp) ProtoMessage added in v1.0.123

func (*ClassificationResp) ProtoMessage()

func (*ClassificationResp) ProtoReflect added in v1.0.123

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

func (*ClassificationResp) Reset added in v1.0.123

func (x *ClassificationResp) Reset()

func (*ClassificationResp) String added in v1.0.123

func (x *ClassificationResp) String() string

type Embedding added in v1.0.128

type Embedding struct {
	Index     *int64    `protobuf:"varint,1,opt,name=index,proto3,oneof" json:"index,omitempty"`
	Embedding []float64 `protobuf:"fixed64,2,rep,packed,name=embedding,proto3" json:"embedding,omitempty"`
	Object    string    `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*Embedding) Descriptor deprecated added in v1.0.128

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

Deprecated: Use Embedding.ProtoReflect.Descriptor instead.

func (*Embedding) GetEmbedding added in v1.0.128

func (x *Embedding) GetEmbedding() []float64

func (*Embedding) GetIndex added in v1.0.128

func (x *Embedding) GetIndex() int64

func (*Embedding) GetObject added in v1.0.128

func (x *Embedding) GetObject() string

func (*Embedding) ProtoMessage added in v1.0.128

func (*Embedding) ProtoMessage()

func (*Embedding) ProtoReflect added in v1.0.128

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

func (*Embedding) Reset added in v1.0.128

func (x *Embedding) Reset()

func (*Embedding) String added in v1.0.128

func (x *Embedding) String() string

type EmbeddingsReq added in v1.0.128

type EmbeddingsReq struct {
	ReqId          string   `protobuf:"bytes,1,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	Input          []string `protobuf:"bytes,2,rep,name=input,proto3" json:"input,omitempty"`
	Model          *Model   `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
	EncodingFormat *string  `protobuf:"bytes,4,opt,name=encoding_format,json=encodingFormat,proto3,oneof" json:"encoding_format,omitempty"`
	User           *string  `protobuf:"bytes,5,opt,name=user,proto3,oneof" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*EmbeddingsReq) Descriptor deprecated added in v1.0.128

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

Deprecated: Use EmbeddingsReq.ProtoReflect.Descriptor instead.

func (*EmbeddingsReq) GetEncodingFormat added in v1.0.128

func (x *EmbeddingsReq) GetEncodingFormat() string

func (*EmbeddingsReq) GetInput added in v1.0.128

func (x *EmbeddingsReq) GetInput() []string

func (*EmbeddingsReq) GetModel added in v1.0.128

func (x *EmbeddingsReq) GetModel() *Model

func (*EmbeddingsReq) GetReqId added in v1.0.128

func (x *EmbeddingsReq) GetReqId() string

func (*EmbeddingsReq) GetUser added in v1.0.128

func (x *EmbeddingsReq) GetUser() string

func (*EmbeddingsReq) ProtoMessage added in v1.0.128

func (*EmbeddingsReq) ProtoMessage()

func (*EmbeddingsReq) ProtoReflect added in v1.0.128

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

func (*EmbeddingsReq) Reset added in v1.0.128

func (x *EmbeddingsReq) Reset()

func (*EmbeddingsReq) String added in v1.0.128

func (x *EmbeddingsReq) String() string

type EmbeddingsResp added in v1.0.128

type EmbeddingsResp struct {
	ReqId  string       `protobuf:"bytes,1,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	Object string       `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Data   []*Embedding `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
	Model  *Model       `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
	Usage  *Usage       `protobuf:"bytes,5,opt,name=usage,proto3" json:"usage,omitempty"`
	Error  *Error       `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*EmbeddingsResp) Descriptor deprecated added in v1.0.128

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

Deprecated: Use EmbeddingsResp.ProtoReflect.Descriptor instead.

func (*EmbeddingsResp) GetData added in v1.0.128

func (x *EmbeddingsResp) GetData() []*Embedding

func (*EmbeddingsResp) GetError added in v1.0.128

func (x *EmbeddingsResp) GetError() *Error

func (*EmbeddingsResp) GetModel added in v1.0.128

func (x *EmbeddingsResp) GetModel() *Model

func (*EmbeddingsResp) GetObject added in v1.0.128

func (x *EmbeddingsResp) GetObject() string

func (*EmbeddingsResp) GetReqId added in v1.0.128

func (x *EmbeddingsResp) GetReqId() string

func (*EmbeddingsResp) GetUsage added in v1.0.128

func (x *EmbeddingsResp) GetUsage() *Usage

func (*EmbeddingsResp) ProtoMessage added in v1.0.128

func (*EmbeddingsResp) ProtoMessage()

func (*EmbeddingsResp) ProtoReflect added in v1.0.128

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

func (*EmbeddingsResp) Reset added in v1.0.128

func (x *EmbeddingsResp) Reset()

func (*EmbeddingsResp) String added in v1.0.128

func (x *EmbeddingsResp) String() string

type Error

type Error struct {
	Code    string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	CodeN   int32  `protobuf:"varint,2,opt,name=code_n,json=codeN,proto3" json:"code_n,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func NewClientSDKRequestError

func NewClientSDKRequestError(raw string) *Error

NOTE: the returned value cannot be `nil`

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) Error

func (m *Error) Error() string

func (*Error) GetCode

func (x *Error) GetCode() string

func (*Error) GetCodeN

func (x *Error) GetCodeN() int32

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect added in v1.0.121

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type ErrorResp

type ErrorResp struct {
	Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	ReqId string `protobuf:"bytes,2,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorResp) Descriptor deprecated

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

Deprecated: Use ErrorResp.ProtoReflect.Descriptor instead.

func (*ErrorResp) GetError

func (x *ErrorResp) GetError() *Error

func (*ErrorResp) GetReqId

func (x *ErrorResp) GetReqId() string

func (*ErrorResp) ProtoMessage

func (*ErrorResp) ProtoMessage()

func (*ErrorResp) ProtoReflect added in v1.0.121

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

func (*ErrorResp) Reset

func (x *ErrorResp) Reset()

func (*ErrorResp) String

func (x *ErrorResp) String() string

type Function added in v1.0.121

type Function struct {

	// The name of the function.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A description of the function, used by the model to choose when and how to
	// call the function.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// The parameters of the function, described as Json Schema.
	Parameters *structpb.Struct `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// The examples of the function parameters, as the above json schema
	// describes.
	Examples []string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty"`
	// contains filtered or unexported fields
}

func (*Function) Descriptor deprecated added in v1.0.121

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

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetDescription added in v1.0.121

func (x *Function) GetDescription() string

func (*Function) GetExamples added in v1.0.121

func (x *Function) GetExamples() []string

func (*Function) GetName added in v1.0.121

func (x *Function) GetName() string

func (*Function) GetParameters added in v1.0.121

func (x *Function) GetParameters() *structpb.Struct

func (*Function) ProtoMessage added in v1.0.121

func (*Function) ProtoMessage()

func (*Function) ProtoReflect added in v1.0.121

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

func (*Function) Reset added in v1.0.121

func (x *Function) Reset()

func (*Function) String added in v1.0.121

func (x *Function) String() string

type FunctionCall added in v1.0.121

type FunctionCall struct {

	// The name of the function to call.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The arguments to call the function with, generated by model, formatted as
	// json, may not valid, the caller should validate the arguments before
	// calling the function.
	Arguments string `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

func (*FunctionCall) Descriptor deprecated added in v1.0.121

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

Deprecated: Use FunctionCall.ProtoReflect.Descriptor instead.

func (*FunctionCall) GetArguments added in v1.0.121

func (x *FunctionCall) GetArguments() string

func (*FunctionCall) GetName added in v1.0.121

func (x *FunctionCall) GetName() string

func (*FunctionCall) ProtoMessage added in v1.0.121

func (*FunctionCall) ProtoMessage()

func (*FunctionCall) ProtoReflect added in v1.0.121

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

func (*FunctionCall) Reset added in v1.0.121

func (x *FunctionCall) Reset()

func (*FunctionCall) String added in v1.0.121

func (x *FunctionCall) String() string

type InnerBypassGetIdentityReq added in v1.0.128

type InnerBypassGetIdentityReq struct {
	Method   string                 `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	BodyHash string                 `protobuf:"bytes,2,opt,name=body_hash,json=bodyHash,proto3" json:"body_hash,omitempty"`
	Uri      string                 `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
	Query    map[string]*ListString `` /* 151-byte string literal not displayed */
	Header   map[string]string      `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*InnerBypassGetIdentityReq) Descriptor deprecated added in v1.0.128

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

Deprecated: Use InnerBypassGetIdentityReq.ProtoReflect.Descriptor instead.

func (*InnerBypassGetIdentityReq) GetBodyHash added in v1.0.128

func (x *InnerBypassGetIdentityReq) GetBodyHash() string

func (*InnerBypassGetIdentityReq) GetHeader added in v1.0.128

func (x *InnerBypassGetIdentityReq) GetHeader() map[string]string

func (*InnerBypassGetIdentityReq) GetMethod added in v1.0.128

func (x *InnerBypassGetIdentityReq) GetMethod() string

func (*InnerBypassGetIdentityReq) GetQuery added in v1.0.128

func (x *InnerBypassGetIdentityReq) GetQuery() map[string]*ListString

func (*InnerBypassGetIdentityReq) GetUri added in v1.0.128

func (x *InnerBypassGetIdentityReq) GetUri() string

func (*InnerBypassGetIdentityReq) ProtoMessage added in v1.0.128

func (*InnerBypassGetIdentityReq) ProtoMessage()

func (*InnerBypassGetIdentityReq) ProtoReflect added in v1.0.128

func (*InnerBypassGetIdentityReq) Reset added in v1.0.128

func (x *InnerBypassGetIdentityReq) Reset()

func (*InnerBypassGetIdentityReq) String added in v1.0.128

func (x *InnerBypassGetIdentityReq) String() string

type InnerBypassGetIdentityResp added in v1.0.128

type InnerBypassGetIdentityResp struct {
	AccessKey string          `protobuf:"bytes,1,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
	Identity  *BypassIdentity `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// contains filtered or unexported fields
}

func (*InnerBypassGetIdentityResp) Descriptor deprecated added in v1.0.128

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

Deprecated: Use InnerBypassGetIdentityResp.ProtoReflect.Descriptor instead.

func (*InnerBypassGetIdentityResp) GetAccessKey added in v1.0.128

func (x *InnerBypassGetIdentityResp) GetAccessKey() string

func (*InnerBypassGetIdentityResp) GetIdentity added in v1.0.128

func (x *InnerBypassGetIdentityResp) GetIdentity() *BypassIdentity

func (*InnerBypassGetIdentityResp) ProtoMessage added in v1.0.128

func (*InnerBypassGetIdentityResp) ProtoMessage()

func (*InnerBypassGetIdentityResp) ProtoReflect added in v1.0.128

func (*InnerBypassGetIdentityResp) Reset added in v1.0.128

func (x *InnerBypassGetIdentityResp) Reset()

func (*InnerBypassGetIdentityResp) String added in v1.0.128

func (x *InnerBypassGetIdentityResp) String() string

type LabelLogprobosValue added in v1.0.123

type LabelLogprobosValue struct {
	Tokens        []string  `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	TokenLogprobs []float64 `protobuf:"fixed64,2,rep,packed,name=token_logprobs,json=tokenLogprobs,proto3" json:"token_logprobs,omitempty"`
	ReqId         string    `protobuf:"bytes,3,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	// contains filtered or unexported fields
}

func (*LabelLogprobosValue) Descriptor deprecated added in v1.0.123

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

Deprecated: Use LabelLogprobosValue.ProtoReflect.Descriptor instead.

func (*LabelLogprobosValue) GetReqId added in v1.0.123

func (x *LabelLogprobosValue) GetReqId() string

func (*LabelLogprobosValue) GetTokenLogprobs added in v1.0.123

func (x *LabelLogprobosValue) GetTokenLogprobs() []float64

func (*LabelLogprobosValue) GetTokens added in v1.0.123

func (x *LabelLogprobosValue) GetTokens() []string

func (*LabelLogprobosValue) ProtoMessage added in v1.0.123

func (*LabelLogprobosValue) ProtoMessage()

func (*LabelLogprobosValue) ProtoReflect added in v1.0.123

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

func (*LabelLogprobosValue) Reset added in v1.0.123

func (x *LabelLogprobosValue) Reset()

func (*LabelLogprobosValue) String added in v1.0.123

func (x *LabelLogprobosValue) String() string

type ListString added in v1.0.128

type ListString struct {
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*ListString) Descriptor deprecated added in v1.0.128

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

Deprecated: Use ListString.ProtoReflect.Descriptor instead.

func (*ListString) GetValues added in v1.0.128

func (x *ListString) GetValues() []string

func (*ListString) ProtoMessage added in v1.0.128

func (*ListString) ProtoMessage()

func (*ListString) ProtoReflect added in v1.0.128

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

func (*ListString) Reset added in v1.0.128

func (x *ListString) Reset()

func (*ListString) String added in v1.0.128

func (x *ListString) String() string

type Logprobs added in v1.0.123

type Logprobs struct {
	TextOffset    []int64             `protobuf:"varint,1,rep,packed,name=text_offset,json=textOffset,proto3" json:"text_offset,omitempty"`
	TokenLogprobs []float64           `protobuf:"fixed64,2,rep,packed,name=token_logprobs,json=tokenLogprobs,proto3" json:"token_logprobs,omitempty"`
	Tokens        []string            `protobuf:"bytes,3,rep,name=tokens,proto3" json:"tokens,omitempty"`
	TopLogprobs   *structpb.ListValue `protobuf:"bytes,4,opt,name=top_logprobs,json=topLogprobs,proto3" json:"top_logprobs,omitempty"`
	// contains filtered or unexported fields
}

func (*Logprobs) Descriptor deprecated added in v1.0.123

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

Deprecated: Use Logprobs.ProtoReflect.Descriptor instead.

func (*Logprobs) GetTextOffset added in v1.0.123

func (x *Logprobs) GetTextOffset() []int64

func (*Logprobs) GetTokenLogprobs added in v1.0.123

func (x *Logprobs) GetTokenLogprobs() []float64

func (*Logprobs) GetTokens added in v1.0.123

func (x *Logprobs) GetTokens() []string

func (*Logprobs) GetTopLogprobs added in v1.0.123

func (x *Logprobs) GetTopLogprobs() *structpb.ListValue

func (*Logprobs) ProtoMessage added in v1.0.123

func (*Logprobs) ProtoMessage()

func (*Logprobs) ProtoReflect added in v1.0.123

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

func (*Logprobs) Reset added in v1.0.123

func (x *Logprobs) Reset()

func (*Logprobs) String added in v1.0.123

func (x *Logprobs) String() string

type Message

type Message struct {

	// The role of the author of this message. One of system, user, assistant or
	// function.
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// The real content of the message, may be empty for assistant message with
	// function call.
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// If the role is `function`, is the name of the function which generate the
	// content.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// The name and arguments of a function call generated by model.
	FunctionCall *FunctionCall `protobuf:"bytes,5,opt,name=function_call,json=functionCall,proto3" json:"function_call,omitempty"`
	// url reference for searching, optional
	References []*Reference `protobuf:"bytes,3,rep,name=references,proto3" json:"references,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetFunctionCall added in v1.0.121

func (x *Message) GetFunctionCall() *FunctionCall

func (*Message) GetName added in v1.0.121

func (x *Message) GetName() string

func (*Message) GetReferences added in v1.0.121

func (x *Message) GetReferences() []*Reference

func (*Message) GetRole

func (x *Message) GetRole() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect added in v1.0.121

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Model

type Model struct {

	// Unified model name in model db
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Use specific endpoint id for inference, if set, parameters `name` and
	// `version` will be ignored.
	EndpointId string `protobuf:"bytes,2,opt,name=endpoint_id,json=endpointId,proto3" json:"endpoint_id,omitempty"`
	// Use specific model version for inference, optional.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*Model) Descriptor deprecated

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

Deprecated: Use Model.ProtoReflect.Descriptor instead.

func (*Model) GetEndpointId

func (x *Model) GetEndpointId() string

func (*Model) GetName

func (x *Model) GetName() string

func (*Model) GetVersion added in v1.0.114

func (x *Model) GetVersion() string

func (*Model) ProtoMessage

func (*Model) ProtoMessage()

func (*Model) ProtoReflect added in v1.0.121

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

func (*Model) Reset

func (x *Model) Reset()

func (*Model) String

func (x *Model) String() string

type Parameters

type Parameters struct {

	// Exponential scaling output probability distribution
	Temperature float32 `protobuf:"fixed32,1,opt,name=temperature,proto3" json:"temperature,omitempty"`
	// The maximum number of tokens to generate in the char completion.
	MaxTokens int64 `protobuf:"varint,2,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"`
	// An alternative to sampling with temperature, called nucleus sampling,
	// where the model considers the results of the tokens with top_p probability
	// mass
	TopP float32 `protobuf:"fixed32,3,opt,name=top_p,json=topP,proto3" json:"top_p,omitempty"`
	// Number between -2.0 and 2.0. Positive values penalize new tokens based
	// on whether they appear in the text so far, increasing the model's
	// likelihood to talk about new topics.
	PresencePenalty float32 `protobuf:"fixed32,4,opt,name=presence_penalty,json=presencePenalty,proto3" json:"presence_penalty,omitempty"`
	// Number between -2.0 and 2.0. Positive values penalize new tokens based on
	// their existing frequency in the text so far, decreasing the model's
	// likelihood to repeat the same line verbatim.
	FrequencyPenalty float32 `protobuf:"fixed32,5,opt,name=frequency_penalty,json=frequencyPenalty,proto3" json:"frequency_penalty,omitempty"`
	// The maximum number of tokens to generate, ignoring the number of tokens in
	// the prompt
	MaxNewTokens int64 `protobuf:"varint,6,opt,name=max_new_tokens,json=maxNewTokens,proto3" json:"max_new_tokens,omitempty"`
	// The parameter for repetition penalty, from [1.0, 2.0]
	RepetitionPenalty float32 `protobuf:"fixed32,7,opt,name=repetition_penalty,json=repetitionPenalty,proto3" json:"repetition_penalty,omitempty"`
	// Whether or not to use sampling, use greedy decoding otherwise. Default to
	// false
	DoSample bool `protobuf:"varint,8,opt,name=do_sample,json=doSample,proto3" json:"do_sample,omitempty"`
	// The number of highest probability vocabulary tokens to keep for
	// top-k-filtering.
	TopK int64 `protobuf:"varint,9,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"`
	// the minimum number of tokens to generate
	MinNewTokens int64 `protobuf:"varint,10,opt,name=min_new_tokens,json=minNewTokens,proto3" json:"min_new_tokens,omitempty"`
	// the maximum number of prompt tokens, if prompt tokens length over this
	// limit, it will be truncated as prompt[-max_prompt_tokens:]
	MaxPromptTokens int64    `protobuf:"varint,11,opt,name=max_prompt_tokens,json=maxPromptTokens,proto3" json:"max_prompt_tokens,omitempty"`
	Logprobs        int64    `protobuf:"varint,12,opt,name=logprobs,proto3" json:"logprobs,omitempty"`
	Stop            []string `protobuf:"bytes,13,rep,name=stop,proto3" json:"stop,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameters) Descriptor deprecated

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

Deprecated: Use Parameters.ProtoReflect.Descriptor instead.

func (*Parameters) GetDoSample

func (x *Parameters) GetDoSample() bool

func (*Parameters) GetFrequencyPenalty

func (x *Parameters) GetFrequencyPenalty() float32

func (*Parameters) GetLogprobs added in v1.0.123

func (x *Parameters) GetLogprobs() int64

func (*Parameters) GetMaxNewTokens

func (x *Parameters) GetMaxNewTokens() int64

func (*Parameters) GetMaxPromptTokens added in v1.0.116

func (x *Parameters) GetMaxPromptTokens() int64

func (*Parameters) GetMaxTokens

func (x *Parameters) GetMaxTokens() int64

func (*Parameters) GetMinNewTokens added in v1.0.113

func (x *Parameters) GetMinNewTokens() int64

func (*Parameters) GetPresencePenalty

func (x *Parameters) GetPresencePenalty() float32

func (*Parameters) GetRepetitionPenalty

func (x *Parameters) GetRepetitionPenalty() float32

func (*Parameters) GetStop added in v1.0.128

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

func (*Parameters) GetTemperature

func (x *Parameters) GetTemperature() float32

func (*Parameters) GetTopK

func (x *Parameters) GetTopK() int64

func (*Parameters) GetTopP

func (x *Parameters) GetTopP() float32

func (*Parameters) ProtoMessage

func (*Parameters) ProtoMessage()

func (*Parameters) ProtoReflect added in v1.0.121

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

func (*Parameters) Reset

func (x *Parameters) Reset()

func (*Parameters) String

func (x *Parameters) String() string

type Reference added in v1.0.121

type Reference struct {

	// url
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// the index of url
	Idx int32 `protobuf:"varint,2,opt,name=idx,proto3" json:"idx,omitempty"`
	// the logo of url
	LogoUrl string `protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
	// the url be used for pc
	PcUrl string `protobuf:"bytes,4,opt,name=pc_url,json=pcUrl,proto3" json:"pc_url,omitempty"`
	// the topic of url
	SiteName string `protobuf:"bytes,5,opt,name=site_name,json=siteName,proto3" json:"site_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Reference) Descriptor deprecated added in v1.0.121

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

Deprecated: Use Reference.ProtoReflect.Descriptor instead.

func (*Reference) GetIdx added in v1.0.121

func (x *Reference) GetIdx() int32

func (*Reference) GetLogoUrl added in v1.0.121

func (x *Reference) GetLogoUrl() string

func (*Reference) GetPcUrl added in v1.0.121

func (x *Reference) GetPcUrl() string

func (*Reference) GetSiteName added in v1.0.121

func (x *Reference) GetSiteName() string

func (*Reference) GetUrl added in v1.0.121

func (x *Reference) GetUrl() string

func (*Reference) ProtoMessage added in v1.0.121

func (*Reference) ProtoMessage()

func (*Reference) ProtoReflect added in v1.0.121

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

func (*Reference) Reset added in v1.0.121

func (x *Reference) Reset()

func (*Reference) String added in v1.0.121

func (x *Reference) String() string

type TokenizeReq added in v1.0.123

type TokenizeReq struct {
	Model *Model `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	ReqId string `protobuf:"bytes,2,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	Text  string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenizeReq) Descriptor deprecated added in v1.0.123

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

Deprecated: Use TokenizeReq.ProtoReflect.Descriptor instead.

func (*TokenizeReq) GetModel added in v1.0.123

func (x *TokenizeReq) GetModel() *Model

func (*TokenizeReq) GetReqId added in v1.0.123

func (x *TokenizeReq) GetReqId() string

func (*TokenizeReq) GetText added in v1.0.123

func (x *TokenizeReq) GetText() string

func (*TokenizeReq) ProtoMessage added in v1.0.123

func (*TokenizeReq) ProtoMessage()

func (*TokenizeReq) ProtoReflect added in v1.0.123

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

func (*TokenizeReq) Reset added in v1.0.123

func (x *TokenizeReq) Reset()

func (*TokenizeReq) String added in v1.0.123

func (x *TokenizeReq) String() string

type TokenizeResp added in v1.0.123

type TokenizeResp struct {
	TotalTokens int64    `protobuf:"varint,1,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"`
	Tokens      []string `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// Unified request id
	ReqId string `protobuf:"bytes,3,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"`
	// Error if exists for the req
	Error *Error `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenizeResp) Descriptor deprecated added in v1.0.123

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

Deprecated: Use TokenizeResp.ProtoReflect.Descriptor instead.

func (*TokenizeResp) GetError added in v1.0.123

func (x *TokenizeResp) GetError() *Error

func (*TokenizeResp) GetReqId added in v1.0.123

func (x *TokenizeResp) GetReqId() string

func (*TokenizeResp) GetTokens added in v1.0.123

func (x *TokenizeResp) GetTokens() []string

func (*TokenizeResp) GetTotalTokens added in v1.0.123

func (x *TokenizeResp) GetTotalTokens() int64

func (*TokenizeResp) ProtoMessage added in v1.0.123

func (*TokenizeResp) ProtoMessage()

func (*TokenizeResp) ProtoReflect added in v1.0.123

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

func (*TokenizeResp) Reset added in v1.0.123

func (x *TokenizeResp) Reset()

func (*TokenizeResp) String added in v1.0.123

func (x *TokenizeResp) String() string

type TopLogprobsItem added in v1.0.123

type TopLogprobsItem struct {
	Item map[string]float32 `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TopLogprobsItem) Descriptor deprecated added in v1.0.123

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

Deprecated: Use TopLogprobsItem.ProtoReflect.Descriptor instead.

func (*TopLogprobsItem) GetItem added in v1.0.123

func (x *TopLogprobsItem) GetItem() map[string]float32

func (*TopLogprobsItem) ProtoMessage added in v1.0.123

func (*TopLogprobsItem) ProtoMessage()

func (*TopLogprobsItem) ProtoReflect added in v1.0.123

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

func (*TopLogprobsItem) Reset added in v1.0.123

func (x *TopLogprobsItem) Reset()

func (*TopLogprobsItem) String added in v1.0.123

func (x *TopLogprobsItem) String() string

type Usage

type Usage struct {

	// The number of prompt tokens
	PromptTokens int64 `protobuf:"varint,1,opt,name=prompt_tokens,json=promptTokens,proto3" json:"prompt_tokens,omitempty"`
	// The number of generated tokens
	CompletionTokens int64 `protobuf:"varint,2,opt,name=completion_tokens,json=completionTokens,proto3" json:"completion_tokens,omitempty"`
	// The number of all: prompt_tokens + completion_tokens
	TotalTokens int64 `protobuf:"varint,3,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) GetCompletionTokens

func (x *Usage) GetCompletionTokens() int64

func (*Usage) GetPromptTokens

func (x *Usage) GetPromptTokens() int64

func (*Usage) GetTotalTokens

func (x *Usage) GetTotalTokens() int64

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect added in v1.0.121

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

func (*Usage) Reset

func (x *Usage) Reset()

func (*Usage) String

func (x *Usage) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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