@blueking/ai-blueking 0.3.21 → 0.3.23

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
@@ -567,13 +567,20 @@ npm i @blueking/bkui-library
567
567
  1. 安装依赖
568
568
 
569
569
  ```bash
570
- npm install
570
+ pnpm install
571
571
  ```
572
572
 
573
573
  2. 启动开发服务器
574
574
 
575
575
  ```bash
576
- npm run dev
576
+ pnpm run dev
577
+ ```
578
+
579
+ 3. 配置 hosts,以.woa.com 结尾的域名,以正常获取cookie
580
+
581
+ ```bash
582
+ # 配置 hosts
583
+ echo "127.0.0.1 local.dev.woa.com" >> /etc/hosts
577
584
  ```
578
585
 
579
586
  ### Demo 运行模式
@@ -599,7 +606,7 @@ npm run dev
599
606
  1. 配置本地 hosts
600
607
 
601
608
 
602
- 2. 设置必要的变量
609
+ 2. 设置必要的变量 (不需要手动修改,playground 中已经存在)
603
610
 
604
611
  ```bash
605
612
  # 网站前缀
@@ -0,0 +1,22 @@
1
+ import { RoleType, MessageStatus } from '../types/enum';
2
+ interface UseBkAiOptions {
3
+ useStream?: boolean;
4
+ apiUrl?: string;
5
+ }
6
+ export declare function useBkAi(options?: UseBkAiOptions): {
7
+ loading: import("vue").Ref<boolean>;
8
+ messages: import("vue").Ref<{
9
+ status?: MessageStatus | undefined;
10
+ time?: string | number | undefined;
11
+ cite?: string | undefined;
12
+ role: RoleType;
13
+ content: string;
14
+ }[]>;
15
+ isShow: import("vue").Ref<boolean>;
16
+ handleShowAi: () => void;
17
+ handleClose: () => void;
18
+ handleClear: () => void;
19
+ handleSend: (args: any) => void;
20
+ handleStop: () => void;
21
+ };
22
+ export {};
@@ -65,7 +65,7 @@ const Yv = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAA
65
65
  translateShortcut: `你是受过语言翻译训练的高技能人工智能。我想让你把用三引号分隔的文本翻译(中文翻译成英文,其他语言翻译成中文),确保译文口语化、地道。
66
66
  只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
67
67
  '''
68
- {{ selected_text }}
68
+ {{ SELECTED_TEXT }}
69
69
  '''`,
70
70
  explanationShortcut: "您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。"
71
71
  }, Xe = (e) => Th !== "en" ? Oh[e] || e : Lh[e] || e, Bv = [