mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
searchSpecSections.ts and consumer - mention vector search
This commit is contained in:
@@ -10,7 +10,7 @@ import { createSearchSpecSectionsTool } from "../../src/agent-tools";
|
||||
|
||||
export default tool({
|
||||
description:
|
||||
"Searches the ECMAScript specification for sections relevant to a query. " +
|
||||
"Vector search the ECMAScript specification for sections relevant to a query. " +
|
||||
"Returns JSON array with sectionId, sectionTitle, score, partIndex, totalParts, and content. " +
|
||||
"Use this when you need to find spec sections related to a JavaScript topic or question.",
|
||||
args: {
|
||||
|
||||
@@ -27,7 +27,7 @@ export function createSearchSpecSectionsTool(
|
||||
return new DynamicStructuredTool({
|
||||
name: "ask262_search_spec_sections",
|
||||
description:
|
||||
"Searches the ECMAScript specification for sections relevant to a query. Returns JSON array with sectionId, sectionTitle, score, partIndex, totalParts, and content. partIndex and totalParts indicate which chunk of a multi-part section this is (0-indexed, partIndex+1/totalParts), null if single-part.",
|
||||
"Vector search the ECMAScript specification for sections relevant to a query. Returns JSON array with sectionId, sectionTitle, score, partIndex, totalParts, and content. partIndex and totalParts indicate which chunk of a multi-part section this is (0-indexed, partIndex+1/totalParts), null if single-part.",
|
||||
schema: searchSpecSchema,
|
||||
func: async ({ query }) => {
|
||||
// Generate embedding for the query
|
||||
|
||||
Reference in New Issue
Block a user