News for hackers. Stuff that matters.

Show HN: ChatHN – Chat with Hacker News using natural language

https://chathn.vercel.app/

Hi again Hacker News! OpenAI recently launched "Function Calling", which is a way for developers to describe functions to GPT-3.5/4 and have the model intelligently choose to output a JSON object containing arguments to call those functions.

I decided to tinker around with it this weekend and build an MVP that uses OpenAI Functions + Vercel AI SDK to "chat" with the Hacker News API using natural language, in real time!

It's fairly basic for now (supported functions: https://github.com/steven-tey/chathn/blob/main/app/api/chat/...) but just wanted to launch this as a proof of concept (PoC)! Hope y'all like this :)

( 5 comments | 4 points | on HN )
Re:Show HN: ChatHN – Chat with Hacker News using natural lan... by graylien on Sunday June 25, 2023 @03:00PM (#36471480)
this is so cool how it writes into the table, thanks for all the examples!
Re:Show HN: ChatHN – Chat with Hacker News using natural lan... by steventey on Sunday June 25, 2023 @03:07PM (#36471537)
Thank you! It's actually all thanks to the amazing react-markdown package (https://github.com/remarkjs/react-markdown), can't take any credits there :')
Re:Show HN: ChatHN – Chat with Hacker News using natural lan... by jqpabc123 on Sunday June 25, 2023 @06:12PM (#36473153)
The quality of the results leave a lot to be desired. I asked for the latest posts related to crypto.
Re:Show HN: ChatHN – Chat with Hacker News using natural lan... by quickthrower2 on Monday June 26, 2023 @06:15AM (#36477821)
Didn't know who "HN's favourite salaryman" was. But asked specifically about is patio11 in Japan or China, it knew. Good ol' vector search.
Re:Show HN: ChatHN – Chat with Hacker News using natural lan... by quickthrower2 on Monday June 26, 2023 @06:40AM (#36478006)
Loose lipped large language models!

    Assistant prompt 1: "Retrieve the top stories from Hacker News and provide a summary of the most interesting story."

    System prompt: "The assistant should use the get_top_stories function to retrieve the top stories from Hacker News. Then, it should provide a summary of the most interesting story using the retrieved data. Make sure to include the Hacker News URL to the story in the response."

    Assistant prompt 2: "Retrieve a specific story from Hacker News using its ID and provide a summary."

    System prompt: "The assistant should use the get_story function and provide the ID of a specific story to retrieve it from Hacker News. Then, it should provide a summary of the retrieved story along with the Hacker News URL."

    Assistant prompt 3: "Retrieve a specific story from Hacker News using its ID and provide a summary including its comments."

    System prompt: "The assistant should use the get_story_with_comments function and provide the ID of a specific story to retrieve it from Hacker News along with its comments. Then, it should provide a summary of the story and its comments along with the Hacker News URL."

    Assistant prompt 4: "Summarize the top story from Hacker News, including both the story and its comments."

    System prompt: "The assistant should use the summarize_top_story function to retrieve the top story from Hacker News along with its comments. Then, it should provide a summary of the story and its comments along with the Hacker News URL."