可信代码库-AI大模型批量对话接口对话及对话功能开发
This commit is contained in:
@@ -38,4 +38,4 @@ VITE_COPILOT_HOST = 'https://test.gitcode.net/child/aichat-app/'
|
||||
VITE_BASE_URL=/
|
||||
|
||||
# AI大模型接口地址
|
||||
VITE_AI_API_HOST = ''http://222.20.126.208:8089'
|
||||
VITE_AI_API_HOST = 'http://222.20.126.208:8089'
|
||||
|
||||
2
.env.loc
2
.env.loc
@@ -40,4 +40,4 @@ VITE_COPILOT_HOST = 'https://local.gitcode.net:8003/child/aichat-app'
|
||||
VITE_BASE_URL=/openRepoPortal/
|
||||
|
||||
# AI大模型接口地址
|
||||
VITE_AI_API_HOST = ''http://222.20.126.208:8089'
|
||||
VITE_AI_API_HOST = 'http://222.20.126.208:8089'
|
||||
|
||||
2
.env.pre
2
.env.pre
@@ -40,4 +40,4 @@ VITE_COPILOT_HOST = 'https://pre-copilot-app.gitcode.com'
|
||||
VITE_BASE_URL=/openRepoPortal/
|
||||
|
||||
# AI大模型接口地址
|
||||
VITE_AI_API_HOST = ''http://222.20.126.208:8089'
|
||||
VITE_AI_API_HOST = 'http://222.20.126.208:8089'
|
||||
|
||||
@@ -40,4 +40,4 @@ VITE_COPILOT_HOST = 'https://copilot-app.gitcode.com'
|
||||
VITE_BASE_URL=/openRepoPortal/
|
||||
|
||||
# AI大模型接口地址
|
||||
VITE_AI_API_HOST = ''http://222.20.126.208:8089'
|
||||
VITE_AI_API_HOST = 'http://222.20.126.208:8089'
|
||||
|
||||
@@ -145,13 +145,11 @@ import WarningList from './components/WarningList.vue';
|
||||
import OssDetail from './components/OssDetail.vue';
|
||||
import Other from './components/Other.vue';
|
||||
import AIList from './components/AIList.vue';
|
||||
import { getChat } from '@/api/jyh';
|
||||
import axios from 'axios';
|
||||
import { useDiscussGetUserInfo } from '@/api/discussion/hook';
|
||||
|
||||
// 获取当前用户信息 & 是否登录
|
||||
const { isLogin = false, userInfo = {}} = useDiscussGetUserInfo();
|
||||
debugger
|
||||
|
||||
const inputValue = ref('');
|
||||
const startChat = ref(false);
|
||||
@@ -214,6 +212,7 @@ const onSubmit = (e, answer = undefined) => {
|
||||
getAIAnswer(e,1);
|
||||
};
|
||||
|
||||
const VITE_AI_API_HOST = (import.meta as any).env.VITE_AI_API_HOST;
|
||||
const getAIAnswer = async (content) => {
|
||||
messages.value.push({
|
||||
from: 'ai-model',
|
||||
@@ -224,8 +223,7 @@ const getAIAnswer = async (content) => {
|
||||
loading: true,
|
||||
});
|
||||
|
||||
const {data} = await axios.get('http://222.20.126.208:8089/api/v0/chat_use_sql?question='+content);
|
||||
debugger
|
||||
const {data} = await axios.get(VITE_AI_API_HOST + '/api/v0/chat_use_sql?question='+content);
|
||||
const {text,type} = data;
|
||||
|
||||
if(type==='text') {
|
||||
|
||||
Reference in New Issue
Block a user