feat: 移除fastapi 接口
This commit is contained in:
@@ -35,7 +35,7 @@ export async function fetchAIStream({
|
||||
platform,
|
||||
conversation_id,
|
||||
}: FetchAIStreamParams) {
|
||||
const res = await fetchWithAuth('chat/stream', {
|
||||
const res = await fetchWithAuth('ai/chat_message/stream/', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ content, platform, conversation_id }),
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useAccessStore } from '@vben/stores';
|
||||
|
||||
import { formatToken } from '#/utils/auth';
|
||||
|
||||
export const API_BASE = '/api/ai/v1/';
|
||||
export const API_BASE = '/api/admin/';
|
||||
|
||||
export function fetchWithAuth(input: RequestInfo, init: RequestInit = {}) {
|
||||
const accessStore = useAccessStore();
|
||||
|
||||
@@ -13,14 +13,10 @@ import {
|
||||
Row,
|
||||
Select,
|
||||
} from 'ant-design-vue';
|
||||
import {
|
||||
createConversation,
|
||||
fetchAIStream,
|
||||
getConversations,
|
||||
getMessages,
|
||||
} from '#/api/ai/chat';
|
||||
import {AiChatConversationModel} from "#/models/ai/chat_conversation";
|
||||
import {AiChatMessageModel} from "#/models/ai/chat_message";
|
||||
|
||||
import { AiChatConversationModel } from '#/models/ai/chat_conversation';
|
||||
import { AiChatMessageModel } from '#/models/ai/chat_message';
|
||||
import {fetchAIStream} from "#/api/ai/chat";
|
||||
|
||||
const aiChatConversation = new AiChatConversationModel();
|
||||
const aiChatMessageModel = new AiChatMessageModel();
|
||||
|
||||
Reference in New Issue
Block a user