<commit_before>package client

import (
	"errors"
	// RPC
	"github.com/asuleymanov/golos-go/apis/account_by_key"
	"github.com/asuleymanov/golos-go/apis/account_history"
	"github.com/asuleymanov/golos-go/apis/database"
	"github.com/asuleymanov/golos-go/apis/follow"
	"github.com/asuleymanov/golos-go/apis/market_history"
	"github.com/asuleymanov/golos-go/apis/network_broadcast"
	"github.com/asuleymanov/golos-go/apis/operation_history"
	"github.com/asuleymanov/golos-go/apis/private_message"
	"github.com/asuleymanov/golos-go/apis/social_network"
	"github.com/asuleymanov/golos-go/apis/tags"
	"github.com/asuleymanov/golos-go/apis/witness"
	"github.com/asuleymanov/golos-go/transactions"
	"github.com/asuleymanov/golos-go/transports"
	"github.com/asuleymanov/golos-go/transports/websocket"
)

// Client can be used to access Golos remote APIs.
// There is a public field for every Golos API available,
// e.g. Client.Database corresponds to database_api.
type Client struct {
	cc transports.CallCloser

	AsyncProtocol bool

	// Database represents database_api.
	Database *database.API

	// Follow represents follow_api.
	Follow *follow.API

	// Follow represents market_history_api.
	MarketHistory *market_history.API

	// NetworkBroadcast represents network_broadcast_api.
	NetworkBroadcast *network_broadcast.API

	// AccountByKey represents account_by_key.
	AccountByKey *account_by_key.API

	// SocialNetwork represents social_network.
	SocialNetwork *social_network.API

	// PrivateMessage represents social_network.
	PrivateMessage *private_message.API

	Witness *witness.API

	AccountHistory *account_history.API

	OperationHistory *operation_history.API

	Tags *tags.API

	//Chain Id
	Chain *transactions.Chain

	// Current keys for operations
	CurrentKeys *Keys
}

// NewClient creates a new RPC client that use the given CallCloser internally.
// Initialize only server present API. Absent API initialized as nil value.
func NewClient(url []string, chain string) (*Client, error) {
	call, err := initClient(url)
	if err != nil {
		return nil, err
	}
	client := &Client{cc: call}

	client.asyncProtocol = false

	client.Database = database.NewAPI(client.cc)

	client.Follow = follow.NewAPI(client.cc)

	client.MarketHistory = market_history.NewAPI(client.cc)
<commit_msg>Fix Client<commit_after>package client

import (
	"errors"
	// RPC
	"github.com/asuleymanov/golos-go/apis/account_by_key"
	"github.com/asuleymanov/golos-go/apis/account_history"
	"github.com/asuleymanov/golos-go/apis/database"
	"github.com/asuleymanov/golos-go/apis/follow"
	"github.com/asuleymanov/golos-go/apis/market_history"
	"github.com/asuleymanov/golos-go/apis/network_broadcast"
	"github.com/asuleymanov/golos-go/apis/operation_history"
	"github.com/asuleymanov/golos-go/apis/private_message"
	"github.com/asuleymanov/golos-go/apis/social_network"
	"github.com/asuleymanov/golos-go/apis/tags"
	"github.com/asuleymanov/golos-go/apis/witness"
	"github.com/asuleymanov/golos-go/transactions"
	"github.com/asuleymanov/golos-go/transports"
	"github.com/asuleymanov/golos-go/transports/websocket"
)

// Client can be used to access Golos remote APIs.
// There is a public field for every Golos API available,
// e.g. Client.Database corresponds to database_api.
type Client struct {
	cc transports.CallCloser

	AsyncProtocol bool

	// Database represents database_api.
	Database *database.API

	// Follow represents follow_api.
	Follow *follow.API

	// Follow represents market_history_api.
	MarketHistory *market_history.API

	// NetworkBroadcast represents network_broadcast_api.
	NetworkBroadcast *network_broadcast.API

	// AccountByKey represents account_by_key.
	AccountByKey *account_by_key.API

	// SocialNetwork represents social_network.
	SocialNetwork *social_network.API

	// PrivateMessage represents social_network.
	PrivateMessage *private_message.API

	Witness *witness.API

	AccountHistory *account_history.API

	OperationHistory *operation_history.API

	Tags *tags.API

	//Chain Id
	Chain *transactions.Chain

	// Current keys for operations
	CurrentKeys *Keys
}

// NewClient creates a new RPC client that use the given CallCloser internally.
// Initialize only server present API. Absent API initialized as nil value.
func NewClient(url []string, chain string) (*Client, error) {
	call, err := initClient(url)
	if err != nil {
		return nil, err
	}
	client := &Client{cc: call}

	client.AsyncProtocol = false

	client.Database = database.NewAPI(client.cc)

	client.Follow = follow.NewAPI(client.cc)

	client.MarketHistory = market_history.NewAPI(client.cc)

{'fraction_non_alphanumeric': 0.10397016889668786, 'fraction_numerical': 0.0, 'mean_word_length': 4.6575682382134, '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': '3450611', 'n_tokens_mistral': 1596, 'n_tokens_neox': 1513, 'n_words': 307}