@hiper2d/ai-agents 0.1.4 → 0.1.5
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/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1897,8 +1897,7 @@ ${msg.content}` };
|
|
|
1897
1897
|
|
|
1898
1898
|
// src/agents/gpt-5-agent.ts
|
|
1899
1899
|
var import_openai = __toESM(require("openai"));
|
|
1900
|
-
var import_zod2 = require("zod");
|
|
1901
|
-
var import_zod3 = require("openai/helpers/zod");
|
|
1900
|
+
var import_zod2 = require("openai/helpers/zod");
|
|
1902
1901
|
var Gpt5Agent = class extends AbstractAgent {
|
|
1903
1902
|
client;
|
|
1904
1903
|
// Log message templates
|
|
@@ -1931,12 +1930,7 @@ var Gpt5Agent = class extends AbstractAgent {
|
|
|
1931
1930
|
`System: ${this.instruction}`,
|
|
1932
1931
|
...this.prepareMessages(messages).map((msg) => `${msg.role === "user" ? "User" : "Assistant"}: ${msg.content}`)
|
|
1933
1932
|
].join("\n\n");
|
|
1934
|
-
|
|
1935
|
-
if (this.enableThinking && zodSchema instanceof import_zod2.z.ZodObject) {
|
|
1936
|
-
schemaToSend = zodSchema.extend({
|
|
1937
|
-
thinking: import_zod2.z.string().describe("Your internal chain-of-thought reasoning process used to arrive at the final answer.")
|
|
1938
|
-
});
|
|
1939
|
-
}
|
|
1933
|
+
const schemaToSend = zodSchema;
|
|
1940
1934
|
let response;
|
|
1941
1935
|
try {
|
|
1942
1936
|
response = await this.client.responses.parse({
|
|
@@ -1945,7 +1939,7 @@ var Gpt5Agent = class extends AbstractAgent {
|
|
|
1945
1939
|
input,
|
|
1946
1940
|
max_output_tokens: this.maxOutputTokens,
|
|
1947
1941
|
text: {
|
|
1948
|
-
format: (0,
|
|
1942
|
+
format: (0, import_zod2.zodTextFormat)(schemaToSend, "response_schema")
|
|
1949
1943
|
}
|
|
1950
1944
|
});
|
|
1951
1945
|
} catch (error) {
|