@zimtsui/brainswitch 0.0.44 → 0.0.45

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.
Files changed (2) hide show
  1. package/README.md +5 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -16,7 +16,7 @@ Brainswitch 支持在一次会话中途切换模型并保持对话上下文,
16
16
 
17
17
  - OpenAI Responses
18
18
  - Google
19
- - 阿里云
19
+ - 阿里云 OpenAI Chat Completions Compatible
20
20
  - Anthropic
21
21
 
22
22
  ## 安装
@@ -118,10 +118,8 @@ type fdm = typeof fdm;
118
118
  type fdu = Function.Declaration.From<fdm>;
119
119
 
120
120
  // 实现函数工具
121
- export class Submission extends Error {
122
- public constructor(public weather: string, public advice: string) {
123
- super();
124
- }
121
+ export class Submission {
122
+ public constructor(public weather: string, public advice: string) {}
125
123
  }
126
124
  const fnm: Function.Map<fdm> = {
127
125
  async get_weather({ city, unit }) {
@@ -136,9 +134,8 @@ const fnm: Function.Map<fdm> = {
136
134
  // 初始化工作流上下文
137
135
  const ctx: InferenceContext = {
138
136
  busy: new RWLock(),
139
- logger: {
140
- message: Channel.create(Presets.Level, message => console.log(message)),
141
- cost(deltaCost) { console.log((-deltaCost).toFixed(2)); },
137
+ cost(deltaCost) {
138
+ console.log((-deltaCost).toFixed(2));
142
139
  },
143
140
  };
144
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zimtsui/brainswitch",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "exports": {
5
5
  ".": "./build/exports.js",
6
6
  "./openai-responses": "./build/native-engines.d/openai-responses/exports.js",
@@ -37,6 +37,6 @@
37
37
  "@sinclair/typebox": "^0.34.40",
38
38
  "@types/node": "^22.17.2",
39
39
  "@zimtsui/coroutine-locks": "^0.0.25",
40
- "@zimtsui/typelog": "^0.0.17"
40
+ "@zimtsui/typelog": "^0.0.18"
41
41
  }
42
42
  }