File tree Expand file tree Collapse file tree 4 files changed +5
-13
lines changed
components/MarkdownPreview/models Expand file tree Collapse file tree 4 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ export const isGithubDeployed = process.env.VITE_ROUTER_MODE === 'hash'
169169
170170# ## 接口函数修改
171171
172- 请求的函数已经针对目前项目内置的所有模型的响应结果做了统一处理,在([src/store/business/index.ts](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/main/src/store/business/index.ts#L36 ))的 [` createAssistantWriterStylized` ](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/main/src/store/business/index.ts#L36 ) 函数,一般情况下,不需要修改此函数,除非遇到极个别模型比较特殊的响应结果格式,需要再额外处理下。
172+ 请求的函数已经针对目前项目内置的所有模型的响应结果做了统一处理,在([src/store/business/index.ts](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/main/src/store/business/index.ts#L30 ))的 [` createAssistantWriterStylized` ](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/main/src/store/business/index.ts#L30 ) 函数,一般情况下,不需要修改此函数,除非遇到极个别模型比较特殊的响应结果格式,需要再额外处理下。
173173
174174
175175---
@@ -327,7 +327,6 @@ export const isGithubDeployed = process.env.VITE_ROUTER_MODE === 'hash'
327327export const useBusinessStore = defineStore(' business-store' , {
328328 state: (): BusinessState => {
329329 return {
330- writerList: [],
331330 systemModelName: defaultModelName
332331 }
333332 },
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ export const modelMappingList: TypesModelLLM[] = [
251251 } ,
252252 body : JSON . stringify ( {
253253 // 集成了大部分模型,可以免费使用
254- 'model' : 'deepseek-ai/DeepSeek-R1-Distill-Qwen-14B ' ,
254+ 'model' : 'THUDM/glm-4-9b-chat ' ,
255255 stream : true ,
256256 messages : [
257257 {
Original file line number Diff line number Diff line change @@ -9,14 +9,12 @@ import * as TransformUtils from '@/components/MarkdownPreview/transform'
99import { defaultModelName , modelMappingList } from '@/components/MarkdownPreview/models'
1010
1111export interface BusinessState {
12- writerList : Array < any >
1312 systemModelName : string
1413}
1514
1615export const useBusinessStore = defineStore ( 'business-store' , {
1716 state : ( ) : BusinessState => {
1817 return {
19- writerList : [ ] ,
2018 systemModelName : defaultModelName
2119 }
2220 } ,
@@ -29,7 +27,7 @@ export const useBusinessStore = defineStore('business-store', {
2927 /**
3028 * Event Stream 调用大模型接口
3129 */
32- async createAssistantWriterStylized ( writerOid , data ) : Promise < { error : number
30+ async createAssistantWriterStylized ( data ) : Promise < { error : number
3331 reader : ReadableStreamDefaultReader < string > | null } > {
3432
3533 // 调用当前模型的接口
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ const modelListSelections = computed(() => {
2828})
2929
3030
31- const currentChatId = computed (() => {
32- return route .params .chatId
33- })
34-
3531const loading = ref (true )
3632
3733setTimeout (() => {
@@ -98,9 +94,8 @@ const handleCreateStylized = async () => {
9894 stylizingLoading .value = true
9995 const textContent = inputTextString .value
10096 inputTextString .value = ' '
101- const { error, reader } = await businessStore .createAssistantWriterStylized (currentChatId .value , {
102- text: textContent ,
103- writer_oid: currentChatId .value
97+ const { error, reader } = await businessStore .createAssistantWriterStylized ({
98+ text: textContent
10499 })
105100
106101 if (error ) {
You can’t perform that action at this time.
0 commit comments