-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from route06inc/websearch
Search and Scrape Webpages
- Loading branch information
Showing
15 changed files
with
1,936 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 25 additions & 19 deletions
44
app/(playground)/p/[agentId]/beta-proto/web-search/schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
import { jsonSchema } from "ai"; | ||
|
||
export const webSearchSchema = jsonSchema<{ plan: string; keywords: string[] }>( | ||
{ | ||
$schema: "https://json-schema.org/draft/2020-12/schema", | ||
title: "keyword schema", | ||
type: "object", | ||
properties: { | ||
plan: { | ||
export const webSearchSchema = jsonSchema<{ | ||
plan: string; | ||
keywords: string[]; | ||
name: string; | ||
}>({ | ||
$schema: "https://json-schema.org/draft/2020-12/schema", | ||
title: "keyword schema", | ||
type: "object", | ||
properties: { | ||
plan: { | ||
type: "string", | ||
description: "Describe the plan that you will archive user request", | ||
}, | ||
name: { | ||
type: "string", | ||
description: "The name of the web search", | ||
}, | ||
keywords: { | ||
type: "array", | ||
items: { | ||
type: "string", | ||
description: "Describe the plan that you will archive user request", | ||
}, | ||
keywords: { | ||
type: "array", | ||
items: { | ||
type: "string", | ||
description: | ||
"Suggest appropriate search queries with relevant keywords at least 3-5 words long", | ||
}, | ||
description: "The keywords to search for user request", | ||
description: | ||
"Suggest appropriate search queries with relevant keywords at least 3-5 words long", | ||
}, | ||
description: "The keywords to search for user request", | ||
}, | ||
required: ["plan", "keywords"], | ||
}, | ||
); | ||
required: ["plan", "name", "keywords"], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.