@matechat/core 0.0.1-alpha.1 → 0.0.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
</a>
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://matechat.gitcode.com/" target="_blank" rel="noopener noreferrer">
|
|
3
|
+
<img alt="MateChat Logo" src="https://matechat.gitcode.com/logo.svg" width="180" style="max-width:100%;">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
<h1 align="center">MateChat</h1>
|
|
5
7
|
<p align="center">前端智能化场景解决方案UI库,轻松构建你的AI应用。已服务于内部多个应用智能化改造,并助力InsCode AI IDE智能化助手搭建。</p>
|
|
6
8
|
|
|
7
9
|

|
|
@@ -60,7 +62,7 @@ createApp(App).use(DevUI).use(MateChat).mount('#app');
|
|
|
60
62
|
|
|
61
63
|
以下为一个简单的对话界面搭建示例:
|
|
62
64
|
|
|
63
|
-
```
|
|
65
|
+
```ts
|
|
64
66
|
<template>
|
|
65
67
|
<McLayout class="container">
|
|
66
68
|
<McHeader :title="'MateChat'" :logoImg="'https://matechat.gitcode.com/logo.svg'">
|
|
@@ -87,7 +89,7 @@ createApp(App).use(DevUI).use(MateChat).mount('#app');
|
|
|
87
89
|
@itemClick="onSubmit($event.label)"
|
|
88
90
|
></McPrompt>
|
|
89
91
|
</McLayoutContent>
|
|
90
|
-
<McLayoutContent v-else>
|
|
92
|
+
<McLayoutContent class="content-container" v-else>
|
|
91
93
|
<template v-for="(msg, idx) in messages" :key="idx">
|
|
92
94
|
<McBubble
|
|
93
95
|
v-if="msg.from === 'user'"
|
|
@@ -230,6 +232,13 @@ const onSubmit = (evt) => {
|
|
|
230
232
|
background: #fff;
|
|
231
233
|
}
|
|
232
234
|
|
|
235
|
+
.content-container {
|
|
236
|
+
display: flex;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
gap: 8px;
|
|
239
|
+
overflow: auto;
|
|
240
|
+
}
|
|
241
|
+
|
|
233
242
|
.input-foot-wrapper {
|
|
234
243
|
display: flex;
|
|
235
244
|
justify-content: space-between;
|
|
@@ -316,7 +325,6 @@ const fetchData = (ques) => {
|
|
|
316
325
|
那么参考以上步骤,【快速开始】中示例可调整下代码。
|
|
317
326
|
|
|
318
327
|
将以下代码:
|
|
319
|
-
|
|
320
328
|
```ts
|
|
321
329
|
const onSubmit = (evt) => {
|
|
322
330
|
startPage.value = false;
|
|
@@ -335,7 +343,6 @@ const onSubmit = (evt) => {
|
|
|
335
343
|
```
|
|
336
344
|
|
|
337
345
|
修改为:
|
|
338
|
-
|
|
339
346
|
```ts
|
|
340
347
|
import OpenAI from 'openai';
|
|
341
348
|
|
|
@@ -354,7 +361,7 @@ const onSubmit = (evt) => {
|
|
|
354
361
|
content: evt,
|
|
355
362
|
avatarConfig: { name: 'user' },
|
|
356
363
|
});
|
|
357
|
-
|
|
364
|
+
|
|
358
365
|
fetchData(evt);
|
|
359
366
|
};
|
|
360
367
|
|
|
@@ -380,7 +387,6 @@ const fetchData = async (ques) => {
|
|
|
380
387
|
}
|
|
381
388
|
};
|
|
382
389
|
```
|
|
383
|
-
|
|
384
390
|
完成模型API地址与APIKey填充后,即拥有了一个对接大模型的简单应用。
|
|
385
391
|
|
|
386
392
|
## 📝 提出意见&建议
|
|
@@ -406,7 +412,7 @@ MateChat 在不断的演进中,你可在这里了解我们的计划:[MateCha
|
|
|
406
412
|
|
|
407
413
|
## 谁在使用
|
|
408
414
|
|
|
409
|
-
[
|
|
415
|
+
[InsCode AI IDE](https://inscode.csdn.net/)
|
|
410
416
|
|
|
411
417
|
## License
|
|
412
418
|
|
|
@@ -414,4 +420,4 @@ MateChat 在不断的演进中,你可在这里了解我们的计划:[MateCha
|
|
|
414
420
|
|
|
415
421
|
## 联系方式
|
|
416
422
|
|
|
417
|
-
欢迎加入我们的开源社区,关注DevUI微信公众号:DevUI
|
|
423
|
+
欢迎加入我们的开源社区,关注DevUI微信公众号:DevUI
|
package/package.json
CHANGED