Merge master into main: Home server identity model

This commit is contained in:
Z User committed 2026-02-19 23:24:34 +00:00
commit 6565ad81b5
227 files changed
+56297 -145

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
import ZAI from 'z-ai-web-dev-sdk';
interface PageReaderFunctionResult {
code: number;
data: {
html: string;
publishedTime?: string;
title: string;
url: string;
usage: {
tokens: number;
};
};
meta: {
usage: {
tokens: number;
};
};
status: number;
}
async function main(url: string) {
try {
const zai = await ZAI.create();
const results: PageReaderFunctionResult = await zai.functions.invoke('page_reader', {
url: url
});
console.log('Web reader invocation succeeded. Results:');
console.log(JSON.stringify(results, null, 2));
} catch (err: any) {
console.error('page_reader failed:', err?.message || err);
}
}
main('https://www.google.com');