@adminforth/agent 1.10.0 → 1.11.0
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/agent/simpleAgent.ts
CHANGED
|
@@ -187,7 +187,7 @@ export function createAgentChatModel(params: {
|
|
|
187
187
|
maxTokens: params.maxTokens,
|
|
188
188
|
useResponsesApi: true,
|
|
189
189
|
outputVersion: "v1",
|
|
190
|
-
|
|
190
|
+
streaming: true,
|
|
191
191
|
promptCacheKey: `adminforth-agent:${model}:system-v1:tools-v1`,
|
|
192
192
|
|
|
193
193
|
promptCacheRetention: "in_memory",
|
|
@@ -114,7 +114,7 @@ export function createAgentChatModel(params) {
|
|
|
114
114
|
const baseURL = (_d = options.baseURL) !== null && _d !== void 0 ? _d : options.baseUrl;
|
|
115
115
|
const reasoning = (_e = options.extraRequestBodyParameters) === null || _e === void 0 ? void 0 : _e.reasoning;
|
|
116
116
|
// @ts-ignore
|
|
117
|
-
return new ChatOpenAI(Object.assign(Object.assign(Object.assign({ apiKey: options.openAiApiKey, model, maxTokens: params.maxTokens, useResponsesApi: true, outputVersion: "v1", promptCacheKey: `adminforth-agent:${model}:system-v1:tools-v1`, promptCacheRetention: "in_memory" }, (reasoning ? { reasoning } : {})), (typeof options.timeoutMs === "number"
|
|
117
|
+
return new ChatOpenAI(Object.assign(Object.assign(Object.assign({ apiKey: options.openAiApiKey, model, maxTokens: params.maxTokens, useResponsesApi: true, outputVersion: "v1", streaming: true, promptCacheKey: `adminforth-agent:${model}:system-v1:tools-v1`, promptCacheRetention: "in_memory" }, (reasoning ? { reasoning } : {})), (typeof options.timeoutMs === "number"
|
|
118
118
|
? { timeout: options.timeoutMs }
|
|
119
119
|
: {})), (baseURL
|
|
120
120
|
? {
|