// Code generated by sdkgen. DO NOT EDIT.

// nolint
package text_generation

import (
	"context"

	"google.golang.org/grpc"

	text_generation "github.com/yandex-cloud/go-genproto/yandex/cloud/ai/foundation_models/v1/text_generation"
)

//revive:disable

// TokenizerServiceClient is a text_generation.TokenizerServiceClient with
// lazy GRPC connection initialization.
type TokenizerServiceClient struct {
	getConn func(ctx context.Context) (*grpc.ClientConn, error)
}

// Tokenize implements text_generation.TokenizerServiceClient
func (c *TokenizerServiceClient) Tokenize(ctx context.Context, in *text_generation.TokenizeRequest, opts ...grpc.CallOption) (*text_generation.TokenizeResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return text_generation.NewTokenizerServiceClient(conn).Tokenize(ctx, in, opts...)
}

// TokenizeCompletion implements text_generation.TokenizerServiceClient
func (c *TokenizerServiceClient) TokenizeCompletion(ctx context.Context, in *text_generation.CompletionRequest, opts ...grpc.CallOption) (*text_generation.TokenizeResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return text_generation.NewTokenizerServiceClient(conn).TokenizeCompletion(ctx, in, opts...)
}
