agents
Version:
A home for your AI agents
23 lines (22 loc) • 895 B
JavaScript
import { u as MAX_WEB_SEARCH_QUERY_LENGTH } from "./tool-DkT_DJBm.js";
import { z } from "zod";
//#region src/web/search/tools/input-schema.ts
/**
* The zod input schema shared by the AI SDK and TanStack AI adapters. Kept
* out of the core so the pi adapter, which uses pi-schema, does not need zod.
* Internal — not an entry point.
*/
/**
* The model's input schema. The description tells the model the host's
* `limit`; a larger value is not rejected (which would cost a validation
* round trip) but capped by the core.
*/
function webSearchInputSchema(maxLimit) {
return z.object({
query: z.string().min(1).max(MAX_WEB_SEARCH_QUERY_LENGTH).describe("What to search for."),
limit: z.number().int().min(1).optional().describe(`How many results to return (at most ${maxLimit}).`)
});
}
//#endregion
export { webSearchInputSchema as t };
//# sourceMappingURL=input-schema-waggtYrH.js.map