Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterImageGenerationAsyncServiceServer(s grpc.ServiceRegistrar, srv ImageGenerationAsyncServiceServer)
- type AspectRatio
- func (*AspectRatio) Descriptor() ([]byte, []int)deprecated
- func (x *AspectRatio) GetHeightRatio() int64
- func (x *AspectRatio) GetWidthRatio() int64
- func (*AspectRatio) ProtoMessage()
- func (x *AspectRatio) ProtoReflect() protoreflect.Message
- func (x *AspectRatio) Reset()
- func (m *AspectRatio) SetHeightRatio(v int64)
- func (m *AspectRatio) SetWidthRatio(v int64)
- func (x *AspectRatio) String() string
- type ImageGenerationAsyncServiceClient
- type ImageGenerationAsyncServiceServer
- type ImageGenerationOptions
- func (*ImageGenerationOptions) Descriptor() ([]byte, []int)deprecated
- func (x *ImageGenerationOptions) GetAspectRatio() *AspectRatio
- func (x *ImageGenerationOptions) GetMimeType() string
- func (x *ImageGenerationOptions) GetSeed() int64
- func (*ImageGenerationOptions) ProtoMessage()
- func (x *ImageGenerationOptions) ProtoReflect() protoreflect.Message
- func (x *ImageGenerationOptions) Reset()
- func (m *ImageGenerationOptions) SetAspectRatio(v *AspectRatio)
- func (m *ImageGenerationOptions) SetMimeType(v string)
- func (m *ImageGenerationOptions) SetSeed(v int64)
- func (x *ImageGenerationOptions) String() string
- type ImageGenerationRequest
- func (*ImageGenerationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ImageGenerationRequest) GetGenerationOptions() *ImageGenerationOptions
- func (x *ImageGenerationRequest) GetMessages() []*Message
- func (x *ImageGenerationRequest) GetModelUri() string
- func (*ImageGenerationRequest) ProtoMessage()
- func (x *ImageGenerationRequest) ProtoReflect() protoreflect.Message
- func (x *ImageGenerationRequest) Reset()
- func (m *ImageGenerationRequest) SetGenerationOptions(v *ImageGenerationOptions)
- func (m *ImageGenerationRequest) SetMessages(v []*Message)
- func (m *ImageGenerationRequest) SetModelUri(v string)
- func (x *ImageGenerationRequest) String() string
- type ImageGenerationResponse
- func (*ImageGenerationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ImageGenerationResponse) GetImage() []byte
- func (x *ImageGenerationResponse) GetModelVersion() string
- func (*ImageGenerationResponse) ProtoMessage()
- func (x *ImageGenerationResponse) ProtoReflect() protoreflect.Message
- func (x *ImageGenerationResponse) Reset()
- func (m *ImageGenerationResponse) SetImage(v []byte)
- func (m *ImageGenerationResponse) SetModelVersion(v string)
- func (x *ImageGenerationResponse) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetText() string
- func (x *Message) GetWeight() float64
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (m *Message) SetText(v string)
- func (m *Message) SetWeight(v float64)
- func (x *Message) String() string
- type UnimplementedImageGenerationAsyncServiceServer
- type UnsafeImageGenerationAsyncServiceServer
Constants ¶
const (
ImageGenerationAsyncService_Generate_FullMethodName = "/yandex.cloud.ai.foundation_models.v1.image_generation.ImageGenerationAsyncService/Generate"
)
Variables ¶
var File_yandex_cloud_ai_foundation_models_v1_image_generation_image_generation_proto protoreflect.FileDescriptor
var File_yandex_cloud_ai_foundation_models_v1_image_generation_image_generation_service_proto protoreflect.FileDescriptor
var ImageGenerationAsyncService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yandex.cloud.ai.foundation_models.v1.image_generation.ImageGenerationAsyncService", HandlerType: (*ImageGenerationAsyncServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Generate", Handler: _ImageGenerationAsyncService_Generate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "yandex/cloud/ai/foundation_models/v1/image_generation/image_generation_service.proto", }
ImageGenerationAsyncService_ServiceDesc is the grpc.ServiceDesc for ImageGenerationAsyncService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterImageGenerationAsyncServiceServer ¶
func RegisterImageGenerationAsyncServiceServer(s grpc.ServiceRegistrar, srv ImageGenerationAsyncServiceServer)
Types ¶
type AspectRatio ¶
type AspectRatio struct { // Weight of width in image. WidthRatio int64 `protobuf:"varint,1,opt,name=width_ratio,json=widthRatio,proto3" json:"width_ratio,omitempty"` // Weight of height in image. HeightRatio int64 `protobuf:"varint,2,opt,name=height_ratio,json=heightRatio,proto3" json:"height_ratio,omitempty"` // contains filtered or unexported fields }
func (*AspectRatio) Descriptor
deprecated
func (*AspectRatio) Descriptor() ([]byte, []int)
Deprecated: Use AspectRatio.ProtoReflect.Descriptor instead.
func (*AspectRatio) GetHeightRatio ¶
func (x *AspectRatio) GetHeightRatio() int64
func (*AspectRatio) GetWidthRatio ¶
func (x *AspectRatio) GetWidthRatio() int64
func (*AspectRatio) ProtoMessage ¶
func (*AspectRatio) ProtoMessage()
func (*AspectRatio) ProtoReflect ¶
func (x *AspectRatio) ProtoReflect() protoreflect.Message
func (*AspectRatio) Reset ¶
func (x *AspectRatio) Reset()
func (*AspectRatio) SetHeightRatio ¶
func (m *AspectRatio) SetHeightRatio(v int64)
func (*AspectRatio) SetWidthRatio ¶
func (m *AspectRatio) SetWidthRatio(v int64)
func (*AspectRatio) String ¶
func (x *AspectRatio) String() string
type ImageGenerationAsyncServiceClient ¶
type ImageGenerationAsyncServiceClient interface { // A method for generating an image based on a textual description. Generate(ctx context.Context, in *ImageGenerationRequest, opts ...grpc.CallOption) (*operation.Operation, error) }
ImageGenerationAsyncServiceClient is the client API for ImageGenerationAsyncService 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.
Service for creating images based on a text description.
func NewImageGenerationAsyncServiceClient ¶
func NewImageGenerationAsyncServiceClient(cc grpc.ClientConnInterface) ImageGenerationAsyncServiceClient
type ImageGenerationAsyncServiceServer ¶
type ImageGenerationAsyncServiceServer interface { // A method for generating an image based on a textual description. Generate(context.Context, *ImageGenerationRequest) (*operation.Operation, error) }
ImageGenerationAsyncServiceServer is the server API for ImageGenerationAsyncService service. All implementations should embed UnimplementedImageGenerationAsyncServiceServer for forward compatibility.
Service for creating images based on a text description.
type ImageGenerationOptions ¶
type ImageGenerationOptions struct { // The [MIME type](https://en.wikipedia.org/wiki/Media_type) of generated image format. // For possible specifications, see [documentation](/docs/foundation-models/concepts). MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // Seed for image generation. It serves as a starting point for image generation from noise. Seed int64 `protobuf:"varint,2,opt,name=seed,proto3" json:"seed,omitempty"` // Aspect ratio of generated image. AspectRatio *AspectRatio `protobuf:"bytes,3,opt,name=aspect_ratio,json=aspectRatio,proto3" json:"aspect_ratio,omitempty"` // contains filtered or unexported fields }
func (*ImageGenerationOptions) Descriptor
deprecated
func (*ImageGenerationOptions) Descriptor() ([]byte, []int)
Deprecated: Use ImageGenerationOptions.ProtoReflect.Descriptor instead.
func (*ImageGenerationOptions) GetAspectRatio ¶
func (x *ImageGenerationOptions) GetAspectRatio() *AspectRatio
func (*ImageGenerationOptions) GetMimeType ¶
func (x *ImageGenerationOptions) GetMimeType() string
func (*ImageGenerationOptions) GetSeed ¶
func (x *ImageGenerationOptions) GetSeed() int64
func (*ImageGenerationOptions) ProtoMessage ¶
func (*ImageGenerationOptions) ProtoMessage()
func (*ImageGenerationOptions) ProtoReflect ¶
func (x *ImageGenerationOptions) ProtoReflect() protoreflect.Message
func (*ImageGenerationOptions) Reset ¶
func (x *ImageGenerationOptions) Reset()
func (*ImageGenerationOptions) SetAspectRatio ¶
func (m *ImageGenerationOptions) SetAspectRatio(v *AspectRatio)
func (*ImageGenerationOptions) SetMimeType ¶
func (m *ImageGenerationOptions) SetMimeType(v string)
func (*ImageGenerationOptions) SetSeed ¶
func (m *ImageGenerationOptions) SetSeed(v int64)
func (*ImageGenerationOptions) String ¶
func (x *ImageGenerationOptions) String() string
type ImageGenerationRequest ¶
type ImageGenerationRequest struct { // The [model URI](/docs/foundation-models/concepts/yandexart/models) to be used for image generation. ModelUri string `protobuf:"bytes,1,opt,name=model_uri,json=modelUri,proto3" json:"model_uri,omitempty"` // A list of messages representing the context for the image generation model. Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` // Image generation options. GenerationOptions *ImageGenerationOptions `protobuf:"bytes,3,opt,name=generation_options,json=generationOptions,proto3" json:"generation_options,omitempty"` // contains filtered or unexported fields }
Request for the service to generate an image.
For examples of usage, see [step-by-step guide](/docs/foundation-models/operations/yandexart/request).
func (*ImageGenerationRequest) Descriptor
deprecated
func (*ImageGenerationRequest) Descriptor() ([]byte, []int)
Deprecated: Use ImageGenerationRequest.ProtoReflect.Descriptor instead.
func (*ImageGenerationRequest) GetGenerationOptions ¶
func (x *ImageGenerationRequest) GetGenerationOptions() *ImageGenerationOptions
func (*ImageGenerationRequest) GetMessages ¶
func (x *ImageGenerationRequest) GetMessages() []*Message
func (*ImageGenerationRequest) GetModelUri ¶
func (x *ImageGenerationRequest) GetModelUri() string
func (*ImageGenerationRequest) ProtoMessage ¶
func (*ImageGenerationRequest) ProtoMessage()
func (*ImageGenerationRequest) ProtoReflect ¶
func (x *ImageGenerationRequest) ProtoReflect() protoreflect.Message
func (*ImageGenerationRequest) Reset ¶
func (x *ImageGenerationRequest) Reset()
func (*ImageGenerationRequest) SetGenerationOptions ¶
func (m *ImageGenerationRequest) SetGenerationOptions(v *ImageGenerationOptions)
func (*ImageGenerationRequest) SetMessages ¶
func (m *ImageGenerationRequest) SetMessages(v []*Message)
func (*ImageGenerationRequest) SetModelUri ¶
func (m *ImageGenerationRequest) SetModelUri(v string)
func (*ImageGenerationRequest) String ¶
func (x *ImageGenerationRequest) String() string
type ImageGenerationResponse ¶
type ImageGenerationResponse struct { // The image is serialized as an array of bytes encoded in [Base64](https://en.wikipedia.org/wiki/Base64). Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` // The model version changes with each new releases. ModelVersion string `protobuf:"bytes,2,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"` // contains filtered or unexported fields }
Response containing generated image.
func (*ImageGenerationResponse) Descriptor
deprecated
func (*ImageGenerationResponse) Descriptor() ([]byte, []int)
Deprecated: Use ImageGenerationResponse.ProtoReflect.Descriptor instead.
func (*ImageGenerationResponse) GetImage ¶
func (x *ImageGenerationResponse) GetImage() []byte
func (*ImageGenerationResponse) GetModelVersion ¶
func (x *ImageGenerationResponse) GetModelVersion() string
func (*ImageGenerationResponse) ProtoMessage ¶
func (*ImageGenerationResponse) ProtoMessage()
func (*ImageGenerationResponse) ProtoReflect ¶
func (x *ImageGenerationResponse) ProtoReflect() protoreflect.Message
func (*ImageGenerationResponse) Reset ¶
func (x *ImageGenerationResponse) Reset()
func (*ImageGenerationResponse) SetImage ¶
func (m *ImageGenerationResponse) SetImage(v []byte)
func (*ImageGenerationResponse) SetModelVersion ¶
func (m *ImageGenerationResponse) SetModelVersion(v string)
func (*ImageGenerationResponse) String ¶
func (x *ImageGenerationResponse) String() string
type Message ¶
type Message struct { // Text describing the image. Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Message weight. Negative values indicate negative messages. Weight float64 `protobuf:"fixed64,2,opt,name=weight,proto3" json:"weight,omitempty"` // contains filtered or unexported fields }
The text descriptions and weights that the model uses to generate an image.
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type UnimplementedImageGenerationAsyncServiceServer ¶
type UnimplementedImageGenerationAsyncServiceServer struct{}
UnimplementedImageGenerationAsyncServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedImageGenerationAsyncServiceServer) Generate ¶
func (UnimplementedImageGenerationAsyncServiceServer) Generate(context.Context, *ImageGenerationRequest) (*operation.Operation, error)
type UnsafeImageGenerationAsyncServiceServer ¶
type UnsafeImageGenerationAsyncServiceServer interface {
// contains filtered or unexported methods
}
UnsafeImageGenerationAsyncServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ImageGenerationAsyncServiceServer will result in compilation errors.