Documentation ¶
Index ¶
- Variables
- type CertReq
- type CertResp
- type ChatReq
- func (*ChatReq) Descriptor() ([]byte, []int)deprecated
- func (x *ChatReq) GetCryptoToken() string
- func (x *ChatReq) GetExtra() map[string]string
- func (x *ChatReq) GetFunctions() []*Function
- func (x *ChatReq) GetMessages() []*Message
- func (x *ChatReq) GetMethod() string
- func (x *ChatReq) GetModel() *Model
- func (x *ChatReq) GetParameters() *Parameters
- func (x *ChatReq) GetPlugins() []string
- func (x *ChatReq) GetReqId() string
- func (x *ChatReq) GetStream() bool
- func (*ChatReq) ProtoMessage()
- func (x *ChatReq) ProtoReflect() protoreflect.Message
- func (x *ChatReq) Reset()
- func (x *ChatReq) String() string
- type ChatResp
- func (*ChatResp) Descriptor() ([]byte, []int)deprecated
- func (x *ChatResp) GetChoice() *Choice
- func (x *ChatResp) GetError() *Error
- func (x *ChatResp) GetExtra() map[string]string
- func (x *ChatResp) GetReqId() string
- func (x *ChatResp) GetUsage() *Usage
- func (*ChatResp) ProtoMessage()
- func (x *ChatResp) ProtoReflect() protoreflect.Message
- func (x *ChatResp) Reset()
- func (x *ChatResp) String() string
- type Choice
- func (*Choice) Descriptor() ([]byte, []int)deprecated
- func (x *Choice) GetFinishReason() string
- func (x *Choice) GetIndex() int32
- func (x *Choice) GetLogprobs() *Logprobs
- func (x *Choice) GetMessage() *Message
- func (*Choice) ProtoMessage()
- func (x *Choice) ProtoReflect() protoreflect.Message
- func (x *Choice) Reset()
- func (x *Choice) String() string
- type ClassificationReq
- func (*ClassificationReq) Descriptor() ([]byte, []int)deprecated
- func (x *ClassificationReq) GetLabels() []string
- func (x *ClassificationReq) GetModel() *Model
- func (x *ClassificationReq) GetQuery() string
- func (x *ClassificationReq) GetReqId() string
- func (*ClassificationReq) ProtoMessage()
- func (x *ClassificationReq) ProtoReflect() protoreflect.Message
- func (x *ClassificationReq) Reset()
- func (x *ClassificationReq) String() string
- type ClassificationResp
- func (*ClassificationResp) Descriptor() ([]byte, []int)deprecated
- func (x *ClassificationResp) GetError() *Error
- func (x *ClassificationResp) GetLabel() string
- func (x *ClassificationResp) GetLabelLogprobos() map[string]*LabelLogprobosValue
- func (x *ClassificationResp) GetReqId() string
- func (x *ClassificationResp) GetUsage() *Usage
- func (*ClassificationResp) ProtoMessage()
- func (x *ClassificationResp) ProtoReflect() protoreflect.Message
- func (x *ClassificationResp) Reset()
- func (x *ClassificationResp) String() string
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (m *Error) Error() string
- func (x *Error) GetCode() string
- func (x *Error) GetCodeN() int32
- func (x *Error) GetMessage() string
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type ErrorResp
- type Function
- func (*Function) Descriptor() ([]byte, []int)deprecated
- func (x *Function) GetDescription() string
- func (x *Function) GetExamples() []string
- func (x *Function) GetName() string
- func (x *Function) GetParameters() *structpb.Struct
- func (*Function) ProtoMessage()
- func (x *Function) ProtoReflect() protoreflect.Message
- func (x *Function) Reset()
- func (x *Function) String() string
- type FunctionCall
- func (*FunctionCall) Descriptor() ([]byte, []int)deprecated
- func (x *FunctionCall) GetArguments() string
- func (x *FunctionCall) GetName() string
- func (*FunctionCall) ProtoMessage()
- func (x *FunctionCall) ProtoReflect() protoreflect.Message
- func (x *FunctionCall) Reset()
- func (x *FunctionCall) String() string
- type LabelLogprobosValue
- func (*LabelLogprobosValue) Descriptor() ([]byte, []int)deprecated
- func (x *LabelLogprobosValue) GetReqId() string
- func (x *LabelLogprobosValue) GetTokenLogprobs() []float64
- func (x *LabelLogprobosValue) GetTokens() []string
- func (*LabelLogprobosValue) ProtoMessage()
- func (x *LabelLogprobosValue) ProtoReflect() protoreflect.Message
- func (x *LabelLogprobosValue) Reset()
- func (x *LabelLogprobosValue) String() string
- type Logprobs
- func (*Logprobs) Descriptor() ([]byte, []int)deprecated
- func (x *Logprobs) GetTextOffset() []int64
- func (x *Logprobs) GetTokenLogprobs() []float64
- func (x *Logprobs) GetTokens() []string
- func (x *Logprobs) GetTopLogprobs() *structpb.ListValue
- func (*Logprobs) ProtoMessage()
- func (x *Logprobs) ProtoReflect() protoreflect.Message
- func (x *Logprobs) Reset()
- func (x *Logprobs) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetContent() string
- func (x *Message) GetFunctionCall() *FunctionCall
- func (x *Message) GetName() string
- func (x *Message) GetReferences() []*Reference
- func (x *Message) GetRole() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Model
- type Parameters
- func (*Parameters) Descriptor() ([]byte, []int)deprecated
- func (x *Parameters) GetDoSample() bool
- func (x *Parameters) GetFrequencyPenalty() float32
- func (x *Parameters) GetLogprobs() int64
- func (x *Parameters) GetMaxNewTokens() int64
- func (x *Parameters) GetMaxPromptTokens() int64
- func (x *Parameters) GetMaxTokens() int64
- func (x *Parameters) GetMinNewTokens() int64
- func (x *Parameters) GetPresencePenalty() float32
- func (x *Parameters) GetRepetitionPenalty() float32
- func (x *Parameters) GetTemperature() float32
- func (x *Parameters) GetTopK() int64
- func (x *Parameters) GetTopP() float32
- func (*Parameters) ProtoMessage()
- func (x *Parameters) ProtoReflect() protoreflect.Message
- func (x *Parameters) Reset()
- func (x *Parameters) String() string
- type Reference
- func (*Reference) Descriptor() ([]byte, []int)deprecated
- func (x *Reference) GetIdx() int32
- func (x *Reference) GetLogoUrl() string
- func (x *Reference) GetPcUrl() string
- func (x *Reference) GetSiteName() string
- func (x *Reference) GetUrl() string
- func (*Reference) ProtoMessage()
- func (x *Reference) ProtoReflect() protoreflect.Message
- func (x *Reference) Reset()
- func (x *Reference) String() string
- type TokenizeReq
- func (*TokenizeReq) Descriptor() ([]byte, []int)deprecated
- func (x *TokenizeReq) GetModel() *Model
- func (x *TokenizeReq) GetReqId() string
- func (x *TokenizeReq) GetText() string
- func (*TokenizeReq) ProtoMessage()
- func (x *TokenizeReq) ProtoReflect() protoreflect.Message
- func (x *TokenizeReq) Reset()
- func (x *TokenizeReq) String() string
- type TokenizeResp
- func (*TokenizeResp) Descriptor() ([]byte, []int)deprecated
- func (x *TokenizeResp) GetError() *Error
- func (x *TokenizeResp) GetReqId() string
- func (x *TokenizeResp) GetTokens() []string
- func (x *TokenizeResp) GetTotalTokens() int64
- func (*TokenizeResp) ProtoMessage()
- func (x *TokenizeResp) ProtoReflect() protoreflect.Message
- func (x *TokenizeResp) Reset()
- func (x *TokenizeResp) String() string
- type TopLogprobsItem
- type Usage
- func (*Usage) Descriptor() ([]byte, []int)deprecated
- func (x *Usage) GetCompletionTokens() int64
- func (x *Usage) GetPromptTokens() int64
- func (x *Usage) GetTotalTokens() int64
- func (*Usage) ProtoMessage()
- func (x *Usage) ProtoReflect() protoreflect.Message
- func (x *Usage) Reset()
- func (x *Usage) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proxy_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
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) ProtoMessage ¶ added in v1.0.113
func (*CertReq) ProtoMessage()
func (*CertReq) ProtoReflect ¶ added in v1.0.121
func (x *CertReq) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶ added in v1.0.113
func (*CertResp) ProtoMessage()
func (*CertResp) ProtoReflect ¶ added in v1.0.121
func (x *CertResp) ProtoReflect() protoreflect.Message
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"` // optional 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"` // optional list of functions the model may generate json inputs for. Functions []*Function `protobuf:"bytes,7,rep,name=functions,proto3" json:"functions,omitempty"` // optional 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) GetCryptoToken ¶ added in v1.0.113
func (*ChatReq) GetFunctions ¶ added in v1.0.121
func (*ChatReq) GetMessages ¶
func (*ChatReq) GetParameters ¶
func (x *ChatReq) GetParameters() *Parameters
func (*ChatReq) GetPlugins ¶ added in v1.0.122
func (*ChatReq) ProtoMessage ¶
func (*ChatReq) ProtoMessage()
func (*ChatReq) ProtoReflect ¶ added in v1.0.121
func (x *ChatReq) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*ChatResp) ProtoMessage()
func (*ChatResp) ProtoReflect ¶ added in v1.0.121
func (x *ChatResp) ProtoReflect() protoreflect.Message
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) GetFinishReason ¶
func (*Choice) GetLogprobs ¶
func (*Choice) GetMessage ¶
func (*Choice) ProtoMessage ¶
func (*Choice) ProtoMessage()
func (*Choice) ProtoReflect ¶ added in v1.0.121
func (x *Choice) ProtoReflect() protoreflect.Message
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 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 ¶
NOTE: the returned value cannot be `nil`
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶ added in v1.0.121
func (x *Error) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*ErrorResp) ProtoMessage()
func (*ErrorResp) ProtoReflect ¶ added in v1.0.121
func (x *ErrorResp) ProtoReflect() protoreflect.Message
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) GetDescription ¶ added in v1.0.121
func (*Function) GetExamples ¶ added in v1.0.121
func (*Function) GetParameters ¶ added in v1.0.121
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
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 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 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) GetTextOffset ¶ added in v1.0.123
func (*Logprobs) GetTokenLogprobs ¶ added in v1.0.123
func (*Logprobs) GetTopLogprobs ¶ added in v1.0.123
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
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) GetContent ¶
func (*Message) GetFunctionCall ¶ added in v1.0.121
func (x *Message) GetFunctionCall() *FunctionCall
func (*Message) GetReferences ¶ added in v1.0.121
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶ added in v1.0.121
func (x *Message) ProtoReflect() protoreflect.Message
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) GetEndpointId ¶
func (*Model) GetVersion ¶ added in v1.0.114
func (*Model) ProtoMessage ¶
func (*Model) ProtoMessage()
func (*Model) ProtoReflect ¶ added in v1.0.121
func (x *Model) ProtoReflect() protoreflect.Message
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"` // 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) 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) GetLogoUrl ¶ added in v1.0.121
func (*Reference) GetSiteName ¶ added in v1.0.121
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
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) GetCompletionTokens ¶
func (*Usage) GetPromptTokens ¶
func (*Usage) GetTotalTokens ¶
func (*Usage) ProtoMessage ¶
func (*Usage) ProtoMessage()
func (*Usage) ProtoReflect ¶ added in v1.0.121
func (x *Usage) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.