@xuda.io/ai_module 1.1.5162 → 1.1.5164
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/index.mjs +6 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4683,6 +4683,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4683
4683
|
await _utils.delay(10000);
|
|
4684
4684
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4685
4685
|
debugger;
|
|
4686
|
+
if (job_info.code < 0 || job_info.data.stat === 4) {
|
|
4687
|
+
return { code: 5, data: 'aborted' };
|
|
4688
|
+
}
|
|
4686
4689
|
}
|
|
4687
4690
|
}
|
|
4688
4691
|
///////////
|
|
@@ -10937,6 +10940,7 @@ export const get_chat_suggestions = async function (req) {
|
|
|
10937
10940
|
|
|
10938
10941
|
const get_suggestions = async function () {
|
|
10939
10942
|
const AgentItemSchema = z.object({
|
|
10943
|
+
type: z.string().describe('constant always "agent"'),
|
|
10940
10944
|
agent_id: z.string().describe('The unique identifier for the agent'),
|
|
10941
10945
|
short_action: z.string().describe('A brief, 2-4 word call to action'),
|
|
10942
10946
|
agent_description: z.string().describe("A professional description of the agent's capabilities"),
|
|
@@ -10978,10 +10982,10 @@ export const get_chat_suggestions = async function (req) {
|
|
|
10978
10982
|
Agent Source: ${JSON.stringify(agents_docs)}
|
|
10979
10983
|
|
|
10980
10984
|
Output: > Return a JSON array of exactly 5 objects following this schema:
|
|
10981
|
-
[{ "agent_id": "string", "short_action": "string", "agent_description": "string" }]
|
|
10985
|
+
[{ "type":"string","agent_id": "string", "short_action": "string", "agent_description": "string" }]
|
|
10982
10986
|
|
|
10983
10987
|
## output example:
|
|
10984
|
-
[{agent_id:"392_agn_55cb328d2743",short_action:"Create article","agent_description":"create proffessional article..."}]
|
|
10988
|
+
[{"type":"agent",agent_id:"392_agn_55cb328d2743",short_action:"Create article","agent_description":"create proffessional article..."}]
|
|
10985
10989
|
|
|
10986
10990
|
`,
|
|
10987
10991
|
model: ai_model,
|