Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix query modeltype list #83

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
Expand Down Expand Up @@ -79,7 +80,7 @@ public enum Scope {
@TableId(value = "id", type = IdType.AUTO)
private Long id;

// @TableId(value = "datasource_type_id")
@TableField(value = "datasource_type_id")
private Long dataSourceTypeId;

/** Key name */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.cloudorc.solidui.dao.entity;

import lombok.Data;

import com.baomidou.mybatisplus.annotation.TableName;

@Data
@TableName("solidui_model_type")
public class ModelType {

private Long id;

private String name;

private String typeName;

private String prompt;

private String token;

private String baseurl;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.cloudorc.solidui.dao.mapper;

import com.cloudorc.solidui.dao.entity.ModelType;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

public interface ModelTypeMapper extends BaseMapper<ModelType> {

List<ModelType> queryList();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.cloudorc.solidui.dao.mapper.ModelTypeMapper">
<sql id="baseSql">
id, `name`, type_name, prompt,token, baseurl
</sql>

<select id="queryList" resultType="com.cloudorc.solidui.dao.entity.ModelType">
select
<include refid="baseSql"/>
from solidui_model_type
</select>

</mapper>
Original file line number Diff line number Diff line change
Expand Up @@ -17,109 +17,37 @@

package com.cloudorc.solidui.entrance.controller;

import static com.cloudorc.solidui.entrance.enums.Status.CREATE_JOB_ERROR;
import static com.cloudorc.solidui.entrance.enums.Status.QUERY_JOB_ERROR;
import static com.cloudorc.solidui.entrance.enums.Status.QUERY_MODEL_TYPE_ERROR;

import com.cloudorc.solidui.entrance.exceptions.ApiException;
import com.cloudorc.solidui.entrance.service.ModelService;
import com.cloudorc.solidui.entrance.utils.Result;
import com.cloudorc.solidui.entrance.vo.ModelCommandVO;
import com.cloudorc.solidui.entrance.vo.ModelKeyVO;

import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;

@Api(tags = "model_tag")
@RestController
@RequestMapping("models")
public class ModelController extends BaseController {

@ApiOperation(value = "generate", notes = "generate_notes")
@ApiImplicitParams({
@ApiImplicitParam(name = "modelId", value = "modelId", dataTypeClass = int.class, example = "123456"),
@ApiImplicitParam(name = "prompt", value = "prompt", dataTypeClass = String.class, example = "prompt"),
})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_JOB_ERROR)
@RequestMapping(path = "/generate", method = RequestMethod.POST)
public Result executeModel(@RequestParam(value = "modelId", required = true) Long modelId,
@RequestParam(value = "prompt", required = true) String prompt) {

String code = "import matplotlib.pyplot as plt\n" +
"\n" +
"data = [{\"x\":\"A\",\"y\":5},{\"x\":\"B\",\"y\":8},{\"x\":\"C\",\"y\":12},{\"x\":\"D\",\"y\":6},{\"x\":\"E\",\"y\":15},{\"x\":\"F\",\"y\":10}]\n"
+
"\n" +
"x = [item[\"x\"] for item in data]\n" +
"y = [item[\"y\"] for item in data]\n" +
"\n" +
"plt.bar(x, y)\n" +
"plt.show()";
Map<String, String> map = new HashMap<>();
map.put("code", code);

return Result.success(map);
}
@Autowired
private ModelService modelService;

@ApiOperation(value = "keys", notes = "keys_notes")
@ApiImplicitParams({})
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_JOB_ERROR)
@ApiException(QUERY_MODEL_TYPE_ERROR)
@RequestMapping(path = "/keys", method = RequestMethod.GET)
public Result getJobPage(HttpServletRequest req) {

List<ModelKeyVO> list = new ArrayList<>();
ModelKeyVO modelKeyVO1 = new ModelKeyVO();
ModelKeyVO modelKeyVO2 = new ModelKeyVO();
modelKeyVO1.setId(1L);
modelKeyVO1.setName("gpt-3.5");
modelKeyVO2.setId(2L);
modelKeyVO2.setName("gpt-4.0");
list.add(modelKeyVO1);
list.add(modelKeyVO2);

return Result.success(list);
}

@ApiOperation(value = "api", notes = "api_notes")
@ApiImplicitParams({
@ApiImplicitParam(name = "command", value = "command", dataTypeClass = String.class, example = "command")
})
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_JOB_ERROR)
@RequestMapping(path = "/api", method = {RequestMethod.POST, RequestMethod.GET})
public Result executeAPI(@RequestParam(value = "command", required = true) String command) {
Result result = new Result();

String co = "import matplotlib.pyplot as plt\n" +
"\n" +
"data = [{\"x\":\"A\",\"y\":5},{\"x\":\"B\",\"y\":8},{\"x\":\"C\",\"y\":12},{\"x\":\"D\",\"y\":6},{\"x\":\"E\",\"y\":15},{\"x\":\"F\",\"y\":10}]\n"
+
"\n" +
"x_values = [item[\"x\"] for item in data]\n" +
"y_values = [item[\"y\"] for item in data]\n" +
"\n" +
"plt.bar(x_values, y_values)\n" +
"plt.show()";
List<ModelCommandVO> list = new ArrayList<>();
ModelCommandVO modelCommandVO = new ModelCommandVO();
modelCommandVO.setType("image/png");
modelCommandVO.setValue(
"iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAA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ur45577okf//jHJZysYzryyCMjk8nEK6+8Euecc06px+kUXnnllc/chwDb66O/p+wa183bLkWzZcuW+OUvfxk/+clPYtWqVa3biy++GIcddlg8+OCDpR6xrGQymdhjjz3i3XffLfUoHVK3bt3irLPOip///OexefPm7R7/z3/+k36oMvbEE0/Eyy+/HOeee26pR4FOyZ2PInnkkUdi48aNccUVV0R1dXWbx84777yYPXt2XH311SWaruPL5XLR1NQUEREbN26MGTNmxKZNm2LkyJElnqzjmjlzZpx88slx0kknxa233hrHHHNMbNmyJRYvXhyzZs2KV155pdQjdkjbftY++OCD+Oc//xmLFi2KhoaGGDFiRFx66aWlHq9D+/Dv6TYVFRVx4IEHlmgiyoX4KJLZs2fHsGHDtguPiIhzzz03pk2bFitXrozjjz++BNN1fIsWLYqDDz44IiIqKyujf//+8Zvf/CaGDBlS2sE6sL59+8bKlStj6tSpcf3118f69evjoIMOisGDB2/3vjz/b9vPWkVFRRxwwAExaNCg+NnPfhajR4/2AedP8OHf02369esXf/3rX0s0EeUik/d3nwBAQrIeAEhKfAAASYkPACAp8QEAJCU+AICkxAcAkJT4AACSEh8AQFLiAwBISnwAAEmJDwAgKfEBACT1fzJrMwgVWiAPAAAAAElFTkSuQmCC");
list.add(modelCommandVO);

return Result.success(list);
return modelService.queryModelList();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
*/
package com.cloudorc.solidui.entrance.enums;

import org.springframework.context.i18n.LocaleContextHolder;

import java.util.Locale;
import java.util.Optional;

import org.springframework.context.i18n.LocaleContextHolder;

public enum Status {

SUCCESS(0, "success", "成功"),
INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"),
USER_NAME_EXIST(10001, "user name already exists", "用户名已存在"),
Expand Down Expand Up @@ -61,6 +61,7 @@ public enum Status {
UPDATE_JOB_ERROR(10076, "update job error", "更新图例报错"),
DELETE_JOB_ERROR(10077, "delete job error", "删除图例报错"),
JOB_PAGE_ALREADY_EXISTS_ERROR(10078, "job page already exists error", "场景存在报错"),
QUERY_MODEL_TYPE_ERROR(10080, "query model type error", "查询模型列表报错"),
FAILED(1, "failed", "失败");

private final int code;
Expand All @@ -85,5 +86,4 @@ public String getMsg() {
}
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.cloudorc.solidui.entrance.service;

import com.cloudorc.solidui.entrance.utils.Result;

public interface ModelService {

Result queryModelList();
}
Loading