@make-u-free/migi 0.5.21 → 0.5.22
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/package.json +1 -1
- package/src/agent.js +10 -8
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -220,14 +220,16 @@ JSON形式のみで返答(他のテキスト不要):
|
|
|
220
220
|
while (true) {
|
|
221
221
|
spinner.start('考え中…')
|
|
222
222
|
|
|
223
|
-
const stream = await this.client.chat.completions.create(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
223
|
+
const stream = await this.client.chat.completions.create(
|
|
224
|
+
{
|
|
225
|
+
model: this.model,
|
|
226
|
+
messages,
|
|
227
|
+
tools: this.tools,
|
|
228
|
+
tool_choice: 'auto',
|
|
229
|
+
stream: true
|
|
230
|
+
},
|
|
231
|
+
signal ? { signal } : {}
|
|
232
|
+
)
|
|
231
233
|
|
|
232
234
|
let content = ''
|
|
233
235
|
const tcMap = {} // tool_calls をインデックスで蓄積
|