<commit_before><?php

namespace OP3Nvoice;

class Search extends Client
{
    public $detail = null;

    /**
     * @param $query
     * @param int $limit
     * @param string $embed
     * @param string $iterator
     *
     * @return array|bool|float|int|string
     */
    public function search($query, $limit = 10, $embed = '', $iterator = '')
    {
        $request = $this->client->get('/v1/search', array(), array('exceptions' => false));

        $request->getQuery()->set('query', $query);
        $request->getQuery()->set('limit', $limit);
        $request->getQuery()->set('embed', $embed);

        $response = $this->process($request);

        $this->detail = $response->json();
<commit_msg>updated the search, bumped the user agent<commit_after><?php

namespace OP3Nvoice;

class Search extends Client
{
    public $detail = null;

    /**
     * @param $query
     * @param int $limit
     * @param string $embed
     * @param string $iterator
     *
     * @return array|bool|float|int|string
     */
    public function search($query, $limit = 10, $params = array())
    {
        $request = $this->client->get('/v1/search', array(), array('exceptions' => false));

        $request->getQuery()->set('query', $query);
        $request->getQuery()->set('limit', $limit);
        foreach($params as $key => $value) {
            $request->getQuery()->set($key, $value);
        }

        $response = $this->process($request);

        $this->detail = $response->json();

{'fraction_non_alphanumeric': 0.18523489932885906, 'fraction_numerical': 0.005369127516778523, 'mean_word_length': 2.718204488778055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, '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': '7099254', 'n_tokens_mistral': 450, 'n_tokens_neox': 439, 'n_words': 100}