Documentation ¶
Index ¶
- Variables
- type Alternative
- func (*Alternative) Descriptor() ([]byte, []int)deprecated
- func (x *Alternative) GetMessage() *Message
- func (x *Alternative) GetStatus() Alternative_AlternativeStatus
- func (*Alternative) ProtoMessage()
- func (x *Alternative) ProtoReflect() protoreflect.Message
- func (x *Alternative) Reset()
- func (m *Alternative) SetMessage(v *Message)
- func (m *Alternative) SetStatus(v Alternative_AlternativeStatus)
- func (x *Alternative) String() string
- type Alternative_AlternativeStatus
- func (Alternative_AlternativeStatus) Descriptor() protoreflect.EnumDescriptor
- func (x Alternative_AlternativeStatus) Enum() *Alternative_AlternativeStatus
- func (Alternative_AlternativeStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x Alternative_AlternativeStatus) Number() protoreflect.EnumNumber
- func (x Alternative_AlternativeStatus) String() string
- func (Alternative_AlternativeStatus) Type() protoreflect.EnumType
- type CompletionOptions
- func (*CompletionOptions) Descriptor() ([]byte, []int)deprecated
- func (x *CompletionOptions) GetMaxTokens() *wrapperspb.Int64Value
- func (x *CompletionOptions) GetStream() bool
- func (x *CompletionOptions) GetTemperature() *wrapperspb.DoubleValue
- func (*CompletionOptions) ProtoMessage()
- func (x *CompletionOptions) ProtoReflect() protoreflect.Message
- func (x *CompletionOptions) Reset()
- func (m *CompletionOptions) SetMaxTokens(v *wrapperspb.Int64Value)
- func (m *CompletionOptions) SetStream(v bool)
- func (m *CompletionOptions) SetTemperature(v *wrapperspb.DoubleValue)
- func (x *CompletionOptions) String() string
- type ContentUsage
- func (*ContentUsage) Descriptor() ([]byte, []int)deprecated
- func (x *ContentUsage) GetCompletionTokens() int64
- func (x *ContentUsage) GetInputTextTokens() int64
- func (x *ContentUsage) GetTotalTokens() int64
- func (*ContentUsage) ProtoMessage()
- func (x *ContentUsage) ProtoReflect() protoreflect.Message
- func (x *ContentUsage) Reset()
- func (m *ContentUsage) SetCompletionTokens(v int64)
- func (m *ContentUsage) SetInputTextTokens(v int64)
- func (m *ContentUsage) SetTotalTokens(v int64)
- func (x *ContentUsage) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (m *Message) GetContent() isMessage_Content
- func (x *Message) GetRole() string
- func (x *Message) GetText() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (m *Message) SetContent(v Message_Content)
- func (m *Message) SetRole(v string)
- func (m *Message) SetText(v string)
- func (x *Message) String() string
- type Message_Content
- type Message_Text
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetId() int64
- func (x *Token) GetSpecial() bool
- func (x *Token) GetText() string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (m *Token) SetId(v int64)
- func (m *Token) SetSpecial(v bool)
- func (m *Token) SetText(v string)
- func (x *Token) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Alternative_AlternativeStatus_name = map[int32]string{ 0: "ALTERNATIVE_STATUS_UNSPECIFIED", 1: "ALTERNATIVE_STATUS_PARTIAL", 2: "ALTERNATIVE_STATUS_TRUNCATED_FINAL", 3: "ALTERNATIVE_STATUS_FINAL", 4: "ALTERNATIVE_STATUS_CONTENT_FILTER", } Alternative_AlternativeStatus_value = map[string]int32{ "ALTERNATIVE_STATUS_UNSPECIFIED": 0, "ALTERNATIVE_STATUS_PARTIAL": 1, "ALTERNATIVE_STATUS_TRUNCATED_FINAL": 2, "ALTERNATIVE_STATUS_FINAL": 3, "ALTERNATIVE_STATUS_CONTENT_FILTER": 4, } )
Enum value maps for Alternative_AlternativeStatus.
var File_yandex_cloud_ai_foundation_models_v1_text_common_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Alternative ¶
type Alternative struct { // A message containing the content of the alternative. Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // The generation status of the alternative Status Alternative_AlternativeStatus `` /* 138-byte string literal not displayed */ // contains filtered or unexported fields }
Represents a generated completion alternative, including its content and generation status.
func (*Alternative) Descriptor
deprecated
func (*Alternative) Descriptor() ([]byte, []int)
Deprecated: Use Alternative.ProtoReflect.Descriptor instead.
func (*Alternative) GetMessage ¶
func (x *Alternative) GetMessage() *Message
func (*Alternative) GetStatus ¶
func (x *Alternative) GetStatus() Alternative_AlternativeStatus
func (*Alternative) ProtoMessage ¶
func (*Alternative) ProtoMessage()
func (*Alternative) ProtoReflect ¶
func (x *Alternative) ProtoReflect() protoreflect.Message
func (*Alternative) Reset ¶
func (x *Alternative) Reset()
func (*Alternative) SetMessage ¶
func (m *Alternative) SetMessage(v *Message)
func (*Alternative) SetStatus ¶
func (m *Alternative) SetStatus(v Alternative_AlternativeStatus)
func (*Alternative) String ¶
func (x *Alternative) String() string
type Alternative_AlternativeStatus ¶
type Alternative_AlternativeStatus int32
Enum representing the generation status of the alternative.
const ( // Unspecified generation status. Alternative_ALTERNATIVE_STATUS_UNSPECIFIED Alternative_AlternativeStatus = 0 // Partially generated alternative. Alternative_ALTERNATIVE_STATUS_PARTIAL Alternative_AlternativeStatus = 1 // Incomplete final alternative resulting from reaching the maximum allowed number of tokens. Alternative_ALTERNATIVE_STATUS_TRUNCATED_FINAL Alternative_AlternativeStatus = 2 // Final alternative generated without running into any limits. Alternative_ALTERNATIVE_STATUS_FINAL Alternative_AlternativeStatus = 3 // Generation was stopped due to the discovery of potentially sensitive content in the prompt or generated response. // To fix, modify the prompt and restart generation. Alternative_ALTERNATIVE_STATUS_CONTENT_FILTER Alternative_AlternativeStatus = 4 )
func (Alternative_AlternativeStatus) Descriptor ¶
func (Alternative_AlternativeStatus) Descriptor() protoreflect.EnumDescriptor
func (Alternative_AlternativeStatus) Enum ¶
func (x Alternative_AlternativeStatus) Enum() *Alternative_AlternativeStatus
func (Alternative_AlternativeStatus) EnumDescriptor
deprecated
func (Alternative_AlternativeStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use Alternative_AlternativeStatus.Descriptor instead.
func (Alternative_AlternativeStatus) Number ¶
func (x Alternative_AlternativeStatus) Number() protoreflect.EnumNumber
func (Alternative_AlternativeStatus) String ¶
func (x Alternative_AlternativeStatus) String() string
func (Alternative_AlternativeStatus) Type ¶
func (Alternative_AlternativeStatus) Type() protoreflect.EnumType
type CompletionOptions ¶
type CompletionOptions struct { // Enables streaming of partially generated text. Stream bool `protobuf:"varint,1,opt,name=stream,proto3" json:"stream,omitempty"` // Affects creativity and randomness of responses. Should be a double number between 0 (inclusive) and 1 (inclusive). // Lower values produce more straightforward responses while higher values lead to increased creativity and randomness. // Default temperature: 0.3 Temperature *wrapperspb.DoubleValue `protobuf:"bytes,2,opt,name=temperature,proto3" json:"temperature,omitempty"` // The limit on the number of tokens used for single completion generation. // Must be greater than zero. This maximum allowed parameter value may depend on the model being used. MaxTokens *wrapperspb.Int64Value `protobuf:"bytes,3,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` // contains filtered or unexported fields }
Defines the options for completion generation.
func (*CompletionOptions) Descriptor
deprecated
func (*CompletionOptions) Descriptor() ([]byte, []int)
Deprecated: Use CompletionOptions.ProtoReflect.Descriptor instead.
func (*CompletionOptions) GetMaxTokens ¶
func (x *CompletionOptions) GetMaxTokens() *wrapperspb.Int64Value
func (*CompletionOptions) GetStream ¶
func (x *CompletionOptions) GetStream() bool
func (*CompletionOptions) GetTemperature ¶
func (x *CompletionOptions) GetTemperature() *wrapperspb.DoubleValue
func (*CompletionOptions) ProtoMessage ¶
func (*CompletionOptions) ProtoMessage()
func (*CompletionOptions) ProtoReflect ¶
func (x *CompletionOptions) ProtoReflect() protoreflect.Message
func (*CompletionOptions) Reset ¶
func (x *CompletionOptions) Reset()
func (*CompletionOptions) SetMaxTokens ¶
func (m *CompletionOptions) SetMaxTokens(v *wrapperspb.Int64Value)
func (*CompletionOptions) SetStream ¶
func (m *CompletionOptions) SetStream(v bool)
func (*CompletionOptions) SetTemperature ¶
func (m *CompletionOptions) SetTemperature(v *wrapperspb.DoubleValue)
func (*CompletionOptions) String ¶
func (x *CompletionOptions) String() string
type ContentUsage ¶
type ContentUsage struct { // The number of tokens in the textual part of the model input. InputTextTokens int64 `protobuf:"varint,1,opt,name=input_text_tokens,json=inputTextTokens,proto3" json:"input_text_tokens,omitempty"` // The total number of tokens in the generated completions. CompletionTokens int64 `protobuf:"varint,2,opt,name=completion_tokens,json=completionTokens,proto3" json:"completion_tokens,omitempty"` // The total number of tokens, including all input tokens and all generated tokens. TotalTokens int64 `protobuf:"varint,3,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"` // contains filtered or unexported fields }
An object representing the number of content [tokens](/docs/foundation-models/concepts/yandexgpt/tokens) used by the completion model.
func (*ContentUsage) Descriptor
deprecated
func (*ContentUsage) Descriptor() ([]byte, []int)
Deprecated: Use ContentUsage.ProtoReflect.Descriptor instead.
func (*ContentUsage) GetCompletionTokens ¶
func (x *ContentUsage) GetCompletionTokens() int64
func (*ContentUsage) GetInputTextTokens ¶
func (x *ContentUsage) GetInputTextTokens() int64
func (*ContentUsage) GetTotalTokens ¶
func (x *ContentUsage) GetTotalTokens() int64
func (*ContentUsage) ProtoMessage ¶
func (*ContentUsage) ProtoMessage()
func (*ContentUsage) ProtoReflect ¶
func (x *ContentUsage) ProtoReflect() protoreflect.Message
func (*ContentUsage) Reset ¶
func (x *ContentUsage) Reset()
func (*ContentUsage) SetCompletionTokens ¶
func (m *ContentUsage) SetCompletionTokens(v int64)
func (*ContentUsage) SetInputTextTokens ¶
func (m *ContentUsage) SetInputTextTokens(v int64)
func (*ContentUsage) SetTotalTokens ¶
func (m *ContentUsage) SetTotalTokens(v int64)
func (*ContentUsage) String ¶
func (x *ContentUsage) String() string
type Message ¶
type Message struct { // The ID of the message sender. Supported roles: // * `system`: Special role used to define the behaviour of the completion model. // * `assistant`: A role used by the model to generate responses. // * `user`: A role used by the user to describe requests to the model. Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` // Message content. // // Types that are assignable to Content: // // *Message_Text Content isMessage_Content `protobuf_oneof:"Content"` // contains filtered or unexported fields }
A message object representing a wrapper over the inputs and outputs of the completion model.
func (*Message) Descriptor
deprecated
func (*Message) GetContent ¶
func (m *Message) GetContent() isMessage_Content
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
func (*Message) SetContent ¶
func (m *Message) SetContent(v Message_Content)
type Message_Content ¶
type Message_Content = isMessage_Content
type Message_Text ¶
type Message_Text struct { // Textual content of the message. Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"` }
type Token ¶
type Token struct { // An internal token identifier. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The textual representation of the token. Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // Indicates whether the token is special or not. Special tokens may define the model's behavior and are not visible to users. Special bool `protobuf:"varint,3,opt,name=special,proto3" json:"special,omitempty"` // contains filtered or unexported fields }
Represents a token, the basic unit of content, used by the foundation model.
func (*Token) Descriptor
deprecated
func (*Token) GetSpecial ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message