<commit_before>package chevalier

import (
	zmq "github.com/pebbe/zmq4"
)

// GetContents list for origin from a Vaultaire
// readerd listening on endpoint, returning it as a DataSourceBurst.
func GetContents(endpoint, origin string) (*DataSourceBurst, error) {
	sources := make([]*DataSourceResponse, 0)
	sock, err := zmq.NewSocket(zmq.REQ)
	if err != nil {
		return nil, err
	}
	err = sock.Connect(endpoint)
	if err != nil {
		return nil, err
	}
	request := make([][]byte, 3)
	request[1] = make([]byte, len(origin))
	for idx, chr := range origin {
		request[1][idx] = byte(chr)
	}
	request[2] = make([]byte, 1)
	request[2][0] = byte(ContentsListRequest)
	_, err = sock.SendMessage(request[0], request[1], request[2])
	if err != nil {
		return nil, err
	}
	for res := new(ContentsResponse); notStopResponse(res); res, err = recvContentsMessage(sock) {
		if err != nil {
			return nil, err
		}
		res_ := unpackSourceResponse(res)
		sources = append(sources, res_)
	}
	return nil, nil
}
<commit_msg>No longer need the client-ID message part<commit_after>package chevalier

import (
	zmq "github.com/pebbe/zmq4"
)

// GetContents list for origin from a Vaultaire
// readerd listening on endpoint, returning it as a DataSourceBurst.
func GetContents(endpoint, origin string) (*DataSourceBurst, error) {
	sources := make([]*DataSourceResponse, 0)
	sock, err := zmq.NewSocket(zmq.REQ)
	if err != nil {
		return nil, err
	}
	err = sock.Connect(endpoint)
	if err != nil {
		return nil, err
	}
	request := make([][]byte, 2)
	request[0] = make([]byte, len(origin))
	for idx, chr := range origin {
		request[1][idx] = byte(chr)
	}
	request[1] = make([]byte, 1)
	request[1][0] = byte(ContentsListRequest)
	_, err = sock.SendMessage(request[0], request[1])
	if err != nil {
		return nil, err
	}
	for res := new(ContentsResponse); notStopResponse(res); res, err = recvContentsMessage(sock) {
		if err != nil {
			return nil, err
		}
		res_ := unpackSourceResponse(res)
		sources = append(sources, res_)
	}
	return nil, nil
}

{'fraction_non_alphanumeric': 0.1441351888667992, 'fraction_numerical': 0.01143141153081511, 'mean_word_length': 4.311345646437995, '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': '1481646', 'n_tokens_mistral': 731, 'n_tokens_neox': 700, 'n_words': 197}