diff --git a/src/renderer/src/api/aiGeneratedImage/index.js b/src/renderer/src/api/aiGeneratedImage/index.js index 3225b30..eeb4211 100644 --- a/src/renderer/src/api/aiGeneratedImage/index.js +++ b/src/renderer/src/api/aiGeneratedImage/index.js @@ -2,6 +2,8 @@ import axios from 'axios' import request from '@/utils/request' import { getToken } from "@/utils/auth"; +let rootPath = import.meta.env.VITE_APP_ENV === 'production' ? 'https://ai.ysaix.com:7864' : '' + // 文生图片 export function convertTextToPicture(data) { return axios({ @@ -42,7 +44,7 @@ export function getPicture(data) { // 大模型对话生成prompt模板 export function chattoprompt(dataset_id,prompt) { return axios({ - url: '/api/v1/parse/docs', + url: rootPath + '/api/v1/parse/docs', method: 'post', headers: { 'Authorization': 'Bearer ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm',