Make improvements to online search prompts and use a custom domain for automations emails

This commit is contained in:
sabaimran 2024-05-03 10:47:42 +05:30
parent 42e9504ba8
commit 737ebfd521
3 changed files with 12 additions and 5 deletions

View file

@ -414,8 +414,8 @@ History:
User: I like to use Hacker News to get my tech news. User: I like to use Hacker News to get my tech news.
AI: Hacker News is an online forum for sharing and discussing the latest tech news. It is a great place to learn about new technologies and startups. AI: Hacker News is an online forum for sharing and discussing the latest tech news. It is a great place to learn about new technologies and startups.
Q: Summarize this post about vector database on Hacker News, https://news.ycombinator.com/item?id=12345 Q: Summarize top posts on Hacker News today
Khoj: {{"links": ["https://news.ycombinator.com/item?id=12345"]}} Khoj: {{"links": ["https://news.ycombinator.com/best"]}}
History: History:
User: I'm currently living in New York but I'm thinking about moving to San Francisco. User: I'm currently living in New York but I'm thinking about moving to San Francisco.
@ -460,8 +460,13 @@ History:
User: I like to use Hacker News to get my tech news. User: I like to use Hacker News to get my tech news.
AI: Hacker News is an online forum for sharing and discussing the latest tech news. It is a great place to learn about new technologies and startups. AI: Hacker News is an online forum for sharing and discussing the latest tech news. It is a great place to learn about new technologies and startups.
Q: Summarize posts about vector databases on Hacker News since Feb 2024 Q: Summarize the top posts on HackerNews
Khoj: {{"queries": ["site:news.ycombinator.com vector database since 1 February 2024"]}} Khoj: {{"queries": ["top posts on HackerNews"]}}
History:
Q: Tell me the latest news about the farmers protest in Colombia and China on Reuters
Khoj: {{"queries": ["site:reuters.com farmers protest Colombia", "site:reuters.com farmers protest China"]}}
History: History:
User: I'm currently living in New York but I'm thinking about moving to San Francisco. User: I'm currently living in New York but I'm thinking about moving to San Francisco.

View file

@ -64,7 +64,7 @@ def send_task_email(name, email, query, result, subject):
r = resend.Emails.send( r = resend.Emails.send(
{ {
"from": "Khoj <khoj@khoj.dev>", "from": "Khoj <khoj@automations.khoj.dev>",
"to": email, "to": email,
"subject": f"{subject}", "subject": f"{subject}",
"html": html_content, "html": html_content,

View file

@ -172,6 +172,8 @@ def get_conversation_command(query: str, any_references: bool = False) -> Conver
return ConversationCommand.General return ConversationCommand.General
elif query.startswith("/online"): elif query.startswith("/online"):
return ConversationCommand.Online return ConversationCommand.Online
elif query.startswith("/webpage"):
return ConversationCommand.Webpage
elif query.startswith("/image"): elif query.startswith("/image"):
return ConversationCommand.Image return ConversationCommand.Image
elif query.startswith("/automated_task"): elif query.startswith("/automated_task"):