<commit_before>package recommendation

import (
	"github.com/algolia/algoliasearch-client-go/v3/algolia/call"
	"github.com/algolia/algoliasearch-client-go/v3/algolia/compression"
	"github.com/algolia/algoliasearch-client-go/v3/algolia/region"
	"github.com/algolia/algoliasearch-client-go/v3/algolia/transport"
)

// Client provides methods to interact with the Algolia Recommendation API.
type Client struct {
	transport *transport.Transport
}

// NewClient instantiates a new client able to interact with the Algolia
// Recommendation API.
func NewClient(appID, apiKey string, region region.Region) *Client {
	return NewClientWithConfig(
		Configuration{
			APIKey: apiKey,
			Region: region,
		},
	)
}

// NewClientWithConfig instantiates a new client able to interact with the
// Recommendation API.
func NewClientWithConfig(config Configuration) *Client {
	var hosts []*transport.StatefulHost

	if config.Hosts == nil {
		hosts = defaultHosts(config.Region)
	} else {
		for _, h := range config.Hosts {
			hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite))
		}
	}

	return &Client{
		transport: transport.New(
			hosts,
			config.Requester,<commit_msg>fix(recommendation): add app id to the default config<commit_after>package recommendation

import (
	"github.com/algolia/algoliasearch-client-go/v3/algolia/call"
	"github.com/algolia/algoliasearch-client-go/v3/algolia/compression"
	"github.com/algolia/algoliasearch-client-go/v3/algolia/region"
	"github.com/algolia/algoliasearch-client-go/v3/algolia/transport"
)

// Client provides methods to interact with the Algolia Recommendation API.
type Client struct {
	transport *transport.Transport
}

// NewClient instantiates a new client able to interact with the Algolia
// Recommendation API.
func NewClient(appID, apiKey string, region region.Region) *Client {
	return NewClientWithConfig(
		Configuration{
			AppID:  appID,
			APIKey: apiKey,
			Region: region,
		},
	)
}

// NewClientWithConfig instantiates a new client able to interact with the
// Recommendation API.
func NewClientWithConfig(config Configuration) *Client {
	var hosts []*transport.StatefulHost

	if config.Hosts == nil {
		hosts = defaultHosts(config.Region)
	} else {
		for _, h := range config.Hosts {
			hosts = append(hosts, transport.NewStatefulHost(h, call.IsReadWrite))
		}
	}

	return &Client{
		transport: transport.New(
			hosts,
			config.Requester,
{'fraction_non_alphanumeric': 0.10257475083056479, 'fraction_numerical': 0.0033222591362126247, 'mean_word_length': 4.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6020053', 'n_tokens_mistral': 833, 'n_tokens_neox': 771, 'n_words': 184}