<commit_before><?php
namespace Admin\Controller;
use Think\Controller;
class AdminController extends CommonController {
    public function index(){
        $this->display();
    }

    public function getAllModels($page = 1,$limit = 6)
    {
        $ApiCloud = D('ApiCloud');
        $map['class'] = 'ac_model';
        $ret = $ApiCloud->getPage($map,$page,$limit);
        $data['success'] = true;
        $data['data'] = $ret['volist'];
        $data['totalRows'] = $ret['count'];
        $data['curPage'] = 1;
        $this->ajaxReturn($data);
    }


    public function deleteModel($id ='')
    {
        $map['class'] = 'ac_model';
        $map['id'] = $id;
        $ApiCloud = D('ApiCloud');
        $ret = $ApiCloud->delete($map);
        if ($ret !== FALSE) {
            $this->success('操作成功');
        }else{
            $this->error('操作失败');
        }
    }

    public function editModel($id ='')
    {
        $map['class'] = 'ac_model';
        $map['id'] = $id;
        $ApiCloud = D('ApiCloud');
        $vo = $ApiCloud->where($map)->find();
        $this->assign('vo', $vo);
        $this->display();
    }

    public function saveModel()
    {
        <commit_msg>修复删除方法的错误<commit_after><?php
namespace Admin\Controller;
use Think\Controller;
class AdminController extends CommonController {
    public function index(){
        $this->display();
    }

    public function getAllModels($page = 1,$limit = 6)
    {
        $ApiCloud = D('ApiCloud');
        $map['class'] = 'ac_model';
        $ret = $ApiCloud->getPage($map,$page,$limit);
        $data['success'] = true;
        $data['data'] = $ret['volist'];
        $data['totalRows'] = $ret['count'];
        $data['curPage'] = 1;
        $this->ajaxReturn($data);
    }


    public function deleteModel($id ='')
    {
        $map['class'] = 'ac_model';
        $map['id'] = $id;
        $ApiCloud = D('ApiCloud');
        $ret = $ApiCloud->where($map)->delete();
        if ($ret !== FALSE) {
            $this->success('操作成功');
        }else{
            $this->error('操作失败');
        }
    }

    public function editModel($id ='')
    {
        $map['class'] = 'ac_model';
        $map['id'] = $id;
        $ApiCloud = D('ApiCloud');
        $vo = $ApiCloud->where($map)->find();
        $this->assign('vo', $vo);
        $this->display();
    }

    public function saveModel()
    {
        
{'fraction_non_alphanumeric': 0.19856962557846025, 'fraction_numerical': 0.002524190155658393, 'mean_word_length': 2.1622340425531914, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, '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': '4815531', 'n_tokens_mistral': 771, 'n_tokens_neox': 770, 'n_words': 134}