-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌐 Basics of web search #347
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@asim-shrestha whats the plan for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, lets send it!
@@ -16,4 +16,44 @@ describe("Strings should be extracted from arrays correctly", () => { | |||
"Integrate with external tools and services to provide users with additional features such as task prioritization and scheduling." | |||
); | |||
}); | |||
|
|||
it("fails with single quotes", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐐 Love to see it!
|
||
async executeTask(task: string, analysis: Analysis): Promise<string> { | ||
// Run search server side since clients won't have a key | ||
if (this.shouldRunClientSide() && analysis.action !== "search") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cant wait to remove this client side stuff. It will help to reduce our package size :)
knowledgeGraph?: KnowledgeGraph; | ||
organic?: OrganicResult[]; | ||
relatedSearches?: RelatedSearch[]; | ||
sportsResults?: SportsResults; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is oddly specific for a web search api 😆
const options = { | ||
method: "POST", | ||
headers: { | ||
"X-API-KEY": this.key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding this key are we going to get ratelimitted here?
constructor(modelSettings: ModelSettings, goal: string) { | ||
super(); | ||
|
||
this.key = process.env.SERP_API_KEY ?? ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put the SERP_API_KEY in the environment schema as an optional.
Image when searching:
Image for when SERP_API is not in ENV: (Will still build)