Skip to content

Commit bfe5c5f

Browse files
authored
⚡feat: update siliconflow model (#33)
1 parent efc3f30 commit bfe5c5f

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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'
327327
export const useBusinessStore = defineStore('business-store', {
328328
state: (): BusinessState => {
329329
return {
330-
writerList: [],
331330
systemModelName: defaultModelName
332331
}
333332
},

src/components/MarkdownPreview/models/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
{

src/store/business/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ import * as TransformUtils from '@/components/MarkdownPreview/transform'
99
import { defaultModelName, modelMappingList } from '@/components/MarkdownPreview/models'
1010

1111
export interface BusinessState {
12-
writerList: Array<any>
1312
systemModelName: string
1413
}
1514

1615
export 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
// 调用当前模型的接口

src/views/chat.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ const modelListSelections = computed(() => {
2828
})
2929
3030
31-
const currentChatId = computed(() => {
32-
return route.params.chatId
33-
})
34-
3531
const loading = ref(true)
3632
3733
setTimeout(() => {
@@ -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) {

0 commit comments

Comments
 (0)