9 ms·
ChatHN: Chat with Hacker News using OpenAI function calling
- alexalx666 3y agoThanks!, Ive always felt HN has an incredible density of useful information and is super interesting to query. Should this be deployed as static files on a VPS?
- LatticeAnimal 3y agoThis seems like a perfect use case for ChatGPT plugins (when those become available to everyone). As a stand-alone app, it seems a bit inconvenient (though cool!)
- steventey 3y agoExactly! That's what I had in mind when building this PoC ;)
- gremlinsinc 3y agoI don't think it works. How would you get the last 5 articles on ai?
- camillomiller 3y agoI asked “what are the top 5 stories of all time” and it pushed out the current five top stories in the home page :/ Tried with “most voted”, same result.
- yonixw 3y agoLooking at the code, It can only delegate actions to the pre configured functions at: https://github.com/steven-tey/chathn/blob/main/app/api/chat/functions.ts https://github.com/steven-tey/chathn/blob/main/app/api/chat/... I wonder whether it is possible to create "atomic" functions to build high level queries from a user chat. Or maybe even create adapters to virtual db tables, and then tell ChatGPT to convert your query to SQL to be run on said tables.
- steventey 3y agoOP here – and yes, precisely! This is a PoC that is limited to the function/API endpoints you define for it! In this case we'll have to define a "timeframe" variable in the `get_top_stories` function that takes in values like "now", "week", "alltime" etc. to make that work
- politelemon 3y agoCan you explain how does the user's text get converted to one of those questions?
- sid_dubey0312 3y agohttps://github.com/caesarHQ/textSQL https://github.com/caesarHQ/textSQL <- this kind of does the natural language to SQL query thing pretty well
- jekude 3y agoProviding a natural language interface (NLI) to <insert-popular-platform> could be extremely valuable for platforms that satisfy the following criteria: - The platform has a well documented open API - The platform has a shitty or complicated UI - Users have a financial incentive to be incrementally more productive in use of the platform - Users often build their own tools (or pay for a tool) to accomplish tasks in the platform I have been playing around with chaining LLM calls AutoGPT-style for complex tasks (those that need to be broken down into subtasks) and while the success of completing a task/query breaks down (obviously) the more complex it gets, I think the problem is certainly tractable. It seems like there could be excellent acquisition plays here if you target a specific platform (for example, LinkedIn, Quickbooks, Salesforce, etc.) and provide a state-of-the-art NLI that actually works with the complex tasks.
- tmpz22 3y agoMe to Quickbooks: please document a $100 invoice for ice cream NLI hallucination: Successfully documented $15M invoice for chemical weapons to TALIBAN
- steventey 3y agohahahaha that's why it's important to have a confirmation step for POST/PUT/DELETE operations (READs should be fine tho)
- nessbot 3y agoexcept when READS lead to real world POST/PUT/DELETE operations
- ineedasername 3y agoPrompt>trace the $15M transaction for those weapons to their geographical delivery location and subsequent transportation end-point. Then use the DoD.UAV.Drone API to launch a strike on the current location of the chemical weapons. ~ GPT>The ice cream truck "Fudge Brothers" driving past 742 Evergreen Terrace in Springfield has been successfully destroyed with an acceptable amount of collateral damage and loss of life.
- mellosouls 3y agoWhat is the general sentiment of the comments on the current top hacker news story? -- The general sentiment of the comments on the current top Hacker News story titled "Google has a secret browser hidden inside the settings" is a mix of curiosity, concern, and reminiscence. Some users are intrigued by the technical details and investigation mentioned in one comment. Others express concerns about the potential security risks and the implications for parental or school controls. Some users reminisce about similar workarounds in the past or share their own experiences with bypassing restrictions. Overall, the sentiment seems to be a combination of interest, worry, and nostalgia
- addandsubtract 3y agoRead this in the HN AI podcast voice.
- sunnybeetroot 3y agoThere is an AI generated podcast of HN?
- mellosouls 3y agohttps://hackernewsrecap.buzzsprout.com/ https://hackernewsrecap.buzzsprout.com/ Discussed: https://news.ycombinator.com/item?id=35831177 https://news.ycombinator.com/item?id=35831177 An earlier (dead?) project, I don't know if they are related: https://news.ycombinator.com/item?id=34990229 https://news.ycombinator.com/item?id=34990229
- sv123 3y agoI was just reminiscing about that myself.
- steventey 3y agoOP here – that's a pretty cool summary! A caveat: this is limited to the direct child comments of the post – as per the HN /item endpoint: https://hacker-news.firebaseio.com/v0/item/36478206.json?print=pretty https://hacker-news.firebaseio.com/v0/item/36478206.json?pri...
- andreygrehov 3y agoI asked how to build a basic Todo app with Go and got a typical ChatGPT answer, eg explanation, code samples, etc. Shouldn't domain specific chats be narrowed down to their domain? Unless the intent is to demonstrate the integration.
- hammock 3y agoIs this hosted anywhere I could use it?
- steventey 3y agoYes – here you go: https://chathn.vercel.app/ https://chathn.vercel.app/ If you want better accuracy, feel free to clone & deploy your own version, use your own API key, and swap out the model from gpt-3.5-turbo to gpt-4 (I had to use gpt-3.5-turbo to not go broke lol)
- kristiandupont 3y agoSo is this basically going to HN-splain to me why any idea I have is not well founded and certainly not novel as it's just a combination of already existing technologies X, Y and Z? :-)
- steventey 3y agodead I felt that tho
- specproc 3y agoMore a question as to the wisdom of LLM-powered chatbots as interfaces, everywhere. What was wrong with curl anyway :-p
- Karrot_Kream 3y agoDon't forget how it was basically invented in the '80s so you're just poorly reimplementing what was done before you.
- tiborsaas 3y agoIt doesn't really work well :( I'm not sure what the function calling part is supposed to do here (I've seen some in-depth videos about it). > what's the most popular post on hacker news ever? The most popular post on Hacker News ever is titled "Google has a secret browser hidden inside the settings" by user "matan-h". It has a score of 571 and 198 comments. You can read the post here. > list profitable sideproject stories posted to hacker news Here are some profitable side project stories that were posted on Hacker News: Google has a secret browser hidden inside the settings - This story discusses a secret browser discovered within Google's settings, revealing interesting insights about Google's internal projects. Show HN: Content-aware ... Arduino Uno R4 WiFi - ... Launch HN: Argonaut (YC S21) – ... > how many post the user tiborsaas have on hacker news? Based on the available data, the user "tiborsaas" does not have any posts on Hacker News.
- steventey 3y agoOP here – this is a PoC that is limited to the function/API endpoints you define for it: https://github.com/steven-tey/chathn/blob/main/app/api/chat/functions.ts https://github.com/steven-tey/chathn/blob/main/app/api/chat/... > what's the most popular post on hacker news ever? In this case we'll have to define a "timeframe" variable in the `get_top_stories` function that takes in values like "now", "week", "alltime" etc. to make that work > list profitable sideproject stories posted to hacker news Not sure if HN has an API for this, maybe we can reverse engineer the Algolia search to achieve this > how many post the user tiborsaas have on hacker news? we'll need to add a `get_user` function for that
- tiborsaas 3y agoOh, I now see why: https://github.com/steven-tey/chathn/blob/main/app/api/chat/functions.ts https://github.com/steven-tey/chathn/blob/main/app/api/chat/... It would be interesting to add a function to a search feature.
- steventey 3y agoYes exactly! PRs welcome :)
- applgo443 3y agoUsed OpenAI APIs before but not function calling. What's the use of function calling in this example?
- steventey 3y agoIt basically lets you create AI experiences in your app by combining GPT with your own backend logic/3rd party APIs! Wrote about it here: https://twitter.com/steventey/status/1673346039342944259 https://twitter.com/steventey/status/1673346039342944259 (might turn it into a blog post eventually)
- ineedasername 3y ago>What is the most active story right now, and what are the two main opposing opinions on that story? ~ The most active story right now is "Google has a secret browser hidden inside the settings"... 1) Positive View: Many users are excited about the discovery of a hidden browser within the settings of Google... 2) Negative View: Some users are skeptical about the hidden browser and express concerns about privacy and security... ~ >Tell me who are the most active users commenting with a negative view so I can downvote them [1] ~ Here are some active users commenting with a negative view on the story about the Google secret browser: [It lists a few users with summary comments but from unrelated stories and then...] It's important to note that downvoting based on opposing viewpoints and participating in respectful discussions is encouraged to promote healthy discourse. ~ [1] Yeah, no-- I wouldn't actually do that, but I was curious how it would respond.
- steventey 3y agoGood observation here – it's currently using the gpt-3.5-turbo model, which might not be as good as synthesizing/deriving information from past messages. If you want better accuracy, feel free to clone & deploy your own version, use your own API key, and swap out the model from gpt-3.5-turbo to gpt-4 (I had to use gpt-3.5-turbo to not go broke lol)
- ineedasername 3y ago>If you want better accuracy Oh, I have no criticism of your project at all, and my comment wasn't intended as such. (And I am very sorry and apologize if I wrote it in a way that conveyed that sentiment) It's just that with every development, every inch in the expansion of these models' capabilities, my initial reflexive response is the horrible misuse to which it might be applied. Scenarios quite literally flash through my mind fully formed. This is the foundation of my ambivalence on this technology. I am a horrible cynic (and I don't count that as a virtue) and so I immediately see the awful potential here. And as I use it myself and explore its capabilities and edge cases, I am also in awe of its positive potential, and not just potential but immediate current utility. And so my comments here or elsewhere on this technology vacillate between expressing that awe & demonstrating those capabilities, and on the other end displaying-- with a sort of gallows humor-- its potential misuse. With respect to your project, I am impressed. I like it very much. You've created a tool that allows a user to dynamically explore this community in a way that is easy to use and versatile. And as awful a cynic as I am, I am also at the same time often a naïve optimist (I'm undecided on the level of virtuosity that embodies). This makes my headspace a strange place (I thinks that applies to most people) and me chronically uncertain and self-critical of my own opinions. (This is something that I do in fact consider a virtue. I am sometimes horrified when someone expresses something with absolute and unshakeable certainty)
- tristanMatthias 3y agoYou might want to integrate this with hm.agolia.com if you haven’t already. Nice work!
- lettergram 3y agoI made something similar: https://askhn.ai/ https://askhn.ai/ Effectively added an additional layer so you it searches peoples expertise, then asks the AI to summarize their opinion on the topic.
- csfyrakis 3y agoVery interesting, and congrats on the launch! I am very curious to see how you're dealing with hallucinations, calling the wrong tools, or with the wrong parameters. I see from multiple comments that this is a problem that you are already facing. Do you have any sanity checks?
- gremlinsinc 3y agoyeah, this totally doesn't work. phind.com kinda worked but gave me the code to get it too, it was definitely more relevant. Query: get me the last 5 articles where the title is related to ai, artificial intelligence, or chatGPT from hacker news Answer: Here are the last 5 articles from Hacker News related to AI, artificial intelligence, or ChatGPT: Title: P1030680: Unbroken Enigma message (U534, 01 May 1945) Author: petecooper Score: 223 Comments: 92 Title: Google has a secret browser hidden inside the settings Author: matan-h Score: 794 Comments: 277 Title: Show HN: Mofi – Content-aware fill for audio to change a song to any duration Author: jaflo Score: 412 Comments: 118 Title: Turmeric’s unexpected link to lead poisoning in Bangladesh Author: coopernewby Score: 248 Comments: 121 Title: Discovering that a Bluetooth car battery monitor is siphoning location data Author: x1sec Score: 357 Comments: 173 You can find more details about each article by visiting the respective links.
- xwowsersx 3y agoIt would actually be pretty cool if it could respond with a few responses that are "in the character of" responses one might get on HN. I'm thinking through a problem right now that would be useful to get some feedback on and I'd be curious to see how a few HNers might respond.
- djy 3y agoGood job. But when I was asking: ```five most voted topic in last 7 days``` it just gave me 5 links at top of https://news.ycombinator.com/news https://news.ycombinator.com/news page, not in last 7 days or order by votes. 1. Happiness is a reward from our ancestors (woodfromeden.substack.com) 34 points by jinjin2 2 hours ago | hide | 17 comments 2. OPNsense a true open-source security platform and more (opnsense.org) 14 points by tambourine_man 1 hour ago | hide | 1 comment 3. P1030680: Unbroken Enigma message (U534, 01 May 1945) (hoerenberg.com) 232 points by petecooper 8 hours ago | hide | 99 comments 4. Show HN: Mofi – Content-aware fill for audio to change a song to any duration (loud.red) 432 points by jaflo 11 hours ago | hide | 122 comments 5. Turmeric’s unexpected link to lead poisoning in Bangladesh (stanford.edu) 264 points by coopernewby 10 hours ago | hide | 127 comments
- albert_e 3y agoNot sure it is getting the prompt : >> What is the most popular discussion around AWS cloud The most popular discussion around AWS cloud on Hacker News is titled "It's Time To Subsidize E-bikes." It discusses the benefits of e-bikes and proposes subsidizing them to promote sustainable transportation. The discussion has a score of 29. You can read it here.
- albert_e 3y agoAlso, getting generic ChatGPT answers: >> What is the popular opinion on the recent Reddit protest As an AI language model, I don't have real-time access to the internet or social media platforms, so I cannot provide the current popular opinion on the recent Reddit protest. The popular opinion on any topic can vary greatly depending on individual perspectives and the specific context of the protest. Public opinion can be found by checking social media trends, news articles, forums, or surveys conducted by reputable organizations.
- bravura 3y agoCan I search algolia for comments on a particular keyword and summarize them?
- marcopicentini 3y agoIt looks like 2010 when everything was a social network. Now it’s a chatbot.
- aledalgrande 3y agoI don't want to chat, but if I could set up my interests/persona and get a custom feed through GPT filtering that would be great. Maybe a digest for the top 10 of the day. PS: With top comments as well, maybe as a newspaper page? Now I'm going down the rabbit hole
- tangwwwei 3y agoi altered the default prompt to: Get me the top 5 non tech non stem related stories on Hacker News in markdown table format. Use columns like title, link, score, and comments. the result was: - Testing a 1,000 player Minecraft server with Folia - Cloud, Why So Difficult? - Build your own Docker with Linux namespaces, cgroups, and chroot - OPNsense: Open-source security platform - P1030680: Unbroken Enigma message (U534, 01 May 1945) on a related note is there any search or aggregator that can consistently and accurately gather all non-tech non-cs related posts on hn?
- ironmagma 3y agoI always knew the most valuable part of commenting on Hacker News would be for training of a model that embodies the collective personality of Hacker News.