@matechat/ng 17.1.0 → 17.2.0-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 CHANGED
@@ -3,7 +3,7 @@
3
3
  <img alt="MateChat Logo" src="https://matechat.gitcode.com/logo.svg" width="180" style="max-width:100%;">
4
4
  </a>
5
5
  </p>
6
- <h1 align="center">MateChat/Angular</h1>
6
+ <h1 align="center">MateChat / Angular</h1>
7
7
  <p align="center">前端智能化场景解决方案UI库,轻松构建你的AI应用。已服务于华为内部多个应用智能化改造,并助力CodeArts、InsCode AI IDE等智能化助手搭建。</p>
8
8
 
9
9
  ![example](https://matechat.gitcode.com/example1.png)
@@ -25,11 +25,11 @@
25
25
  如果你还没有新建项目,可以使用 Angular CLI 首先初始化一个`angular`项目:
26
26
 
27
27
  ```bash
28
- npm install -g @angular/cli@latest
28
+ $ npm install -g @angular/cli@latest
29
29
 
30
- ng new matechat-demo
30
+ $ ng new matechat-demo
31
31
 
32
- npm i @matechat/ng
32
+ $ npm i @matechat/ng
33
33
  ```
34
34
 
35
35
  ### 2. 引入
@@ -80,6 +80,7 @@ export class AppComponent {}
80
80
  </div>
81
81
  ```
82
82
 
83
+
83
84
  ```ts
84
85
  import { Component } from '@angular/core';
85
86
  import { CommonModule } from '@angular/common';
@@ -133,7 +134,6 @@ export class App {
133
134
  margin-top: 8px;
134
135
  }
135
136
  ```
136
-
137
137
  ### 4. 主题化
138
138
 
139
139
  在`main.ts`中初始化主题
@@ -148,7 +148,6 @@ import { ThemeServiceInit, infinityTheme } from "devui-theme";
148
148
  ThemeServiceInit({ infinityTheme }, "infinityTheme");
149
149
  bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
150
150
  ```
151
-
152
151
  ## 🧩 对接模型服务
153
152
 
154
153
  在搭建完成页面后,可以开始对接模型服务,如 `盘古大模型`、`ChatGPT` 等优秀大模型,在注册并生成对应模型的调用API_Key后,可以参考如下方法进行调用:
@@ -156,7 +155,7 @@ bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err))
156
155
  1. 通过 npm 安装 openai:
157
156
 
158
157
  ```bash
159
- npm install openai
158
+ $ npm install openai
160
159
  ```
161
160
 
162
161
  2. 使用OpenAI初始化并调用模型接口,如下为一段代码示例: