| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- import HttpAxios from '@/utils/axios'
- const base = import.meta.env.VITE_API_HOST
- const baseUrl = `${base}/main_new_version.php`
- /**
- * Prompt Configuration数据
- */
- export const getPromptConfiguration = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot',
- ...params
- },
- config
- )
- }
- /**
- * 保存Prompt Configuration数据
- */
- export const SavePromptConfiguration = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot',
- operate: 'save',
- ...params
- },
- config
- )
- }
- /**
- * 编辑返回prompt数据
- */
- export const EditPrompt = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot',
- operate: 'preview_propmpt_witout_save',
- ...params
- },
- config
- )
- }
- /**
- * AI测试问题
- */
- export const PromptAITest = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot',
- operate: 'test_with_ds_claude',
- ...params
- },
- config
- )
- }
- /**
- * 获取prompt提示器
- */
- export const getPrompt = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat',
- operate: 'ai_chat_prompt',
- ...params
- },
- config
- )
- }
- /**
- * ai聊天
- */
- export const aiChat = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat',
- operate: 'ai_chat',
- ...params
- },
- config
- )
- }
- /**
- * 暂停ai聊天
- */
- export const pauseAiChat = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat',
- operate: 'ai_chat_stop',
- ...params
- },
- config
- )
- }
- /**
- * 评价ai聊天
- */
- export const feedbackAiChat = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat',
- operate: 'ai_chat_answer_mark',
- ...params
- },
- config
- )
- }
- /**
- * AI Robot预设问题显示
- */
- export const AIRobotInit = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat',
- operate: 'ai_chat_fixed_init',
- ...params
- },
- config
- )
- }
- /**
- * 获取chat log 表格列
- */
- export const getChatLogTableColumn = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat_log',
- ...params
- },
- config
- )
- }
- /**
- * 根据筛选项获取chat log 表格数据
- */
- export const getChatLogTableData = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat_log',
- operate: 'search',
- ...params
- },
- config
- )
- }
- /**
- * 获取chat log 表格全部数据
- */
- export const getChatLogAllTableData = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat_log',
- operate: 'excel',
- ...params
- },
- config
- )
- }
- /**
- * 获取ai api log 表格列
- */
- export const getAIApiLogTableColumn = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_api_log',
- ...params
- },
- config
- )
- }
- /**
- * 根据筛选项获取ai api log表格数据
- */
- export const getAIApiLogTableData = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_api_log',
- operate: 'search',
- ...params
- },
- config
- )
- }
- /**
- * 获取ai api log表格全部数据
- */
- export const getAIApiLogAllTableData = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_api_log',
- operate: 'excel',
- ...params
- },
- config
- )
- }
- /**
- * 获取ai api log弹窗详情
- */
- export const getAIApiLogDialog = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'robot_chat_log',
- operate: 'api_log',
- ...params
- },
- config
- )
- }
|