image_generation

package
v0.0.0-...-5fa7aab Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageGenerationAsyncService_Generate_FullMethodName = "/yandex.cloud.ai.foundation_models.v1.image_generation.ImageGenerationAsyncService/Generate"
)

Variables

View Source
var File_yandex_cloud_ai_foundation_models_v1_image_generation_image_generation_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_foundation_models_v1_image_generation_image_generation_service_proto protoreflect.FileDescriptor
View Source
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 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.

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

type ImageGenerationOptions

type ImageGenerationOptions struct {

	// MIME type of generated image format.
	MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Seed for image generation.
	Seed int64 `protobuf:"varint,2,opt,name=seed,proto3" json:"seed,omitempty"`
	// contains filtered or unexported fields
}

func (*ImageGenerationOptions) Descriptor deprecated

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

Deprecated: Use ImageGenerationOptions.ProtoReflect.Descriptor instead.

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) 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 [ID of the model](/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.

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.
	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) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetText

func (x *Message) GetText() string

func (*Message) GetWeight

func (x *Message) GetWeight() float64

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) SetText

func (m *Message) SetText(v string)

func (*Message) SetWeight

func (m *Message) SetWeight(v float64)

func (*Message) String

func (x *Message) String() string

type UnimplementedImageGenerationAsyncServiceServer

type UnimplementedImageGenerationAsyncServiceServer struct {
}

UnimplementedImageGenerationAsyncServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedImageGenerationAsyncServiceServer) Generate

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.

Jump to

Keyboard shortcuts

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