<commit_before><?php

namespace Zhiyi\Plus\Http\Controllers\Admin;

use Zhiyi\Plus\Http\Controllers\Controller;
use Zhiyi\Plus\Services\Storage as StorageService;

class StorageController extends Controller
{
    /**
     * 获取所有的储存引擎.
     *
     * @return mixed
     * @author <NAME> <<EMAIL>>
     */
    public function showEngines(StorageService $storageService)
    {
        $engines = $storageService->getEngines();
        $selected = $storageService->getEngineSelect();
        $optionsValues = $storageService->getEngineOption($selected);

        return response()->json([
            'engines' => $engines,
            'selected' => $selected,
            'optionsValues' => $optionsValues,
        ])->setStatusCode(200);
    }
}<commit_msg>增加修改储存引擎配置控制器。<commit_after><?php

namespace Zhiyi\Plus\Http\Controllers\Admin;

use Illuminate\Http\Request;
use Zhiyi\Plus\Http\Controllers\Controller;
use Zhiyi\Plus\Services\Storage as StorageService;

class StorageController extends Controller
{
    /**
     * 获取所有的储存引擎.
     *
     * @return mixed
     * @author <NAME> <<EMAIL>>
     */
    public function showEngines(StorageService $storageService)
    {
        $engines = $storageService->getEngines();
        $selected = $storageService->getEngineSelect();
        $optionsValues = $storageService->getEngineOption($selected);

        return response()->json([
            'engines' => $engines,
            'selected' => $selected,
            'optionsValues' => $optionsValues,
        ])->setStatusCode(200);
    }

    /**
     * 修改用户选择引擎的表单配置.
     *
     * @param Request $request
     * @param string $engine
     * @return mixed
     * @author <NAME> <<EMAIL>>
     */
    public function updateEngineOption(Request $request, string $engine)
    {
        var_dump($engine);
    }
}
{'fraction_non_alphanumeric': 0.13211719181868437, 'fraction_numerical': 0.003316749585406302, 'mean_word_length': 2.7474120082815734, 'pattern_counts': {'":': 0, '<': 14, '<?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': '3099989', 'n_tokens_mistral': 568, 'n_tokens_neox': 571, 'n_words': 97}