<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Brackin on Medium]]></title>
        <description><![CDATA[Stories by David Brackin on Medium]]></description>
        <link>https://medium.com/@dp.brackin?source=rss-9898e2e7c688------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NDBwDNi_ed7VaQDO</url>
            <title>Stories by David Brackin on Medium</title>
            <link>https://medium.com/@dp.brackin?source=rss-9898e2e7c688------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 08:16:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dp.brackin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How we used ChatGPT to build a smart AI assistant for our mobile app.]]></title>
            <link>https://medium.com/@dp.brackin/how-we-used-chatgpt-to-build-a-smart-ai-assistant-for-our-mobile-app-abe32d224ac?source=rss-9898e2e7c688------2</link>
            <guid isPermaLink="false">https://medium.com/p/abe32d224ac</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[David Brackin]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 18:01:21 GMT</pubDate>
            <atom:updated>2023-04-05T18:20:09.789Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bMmcjlijpJHSiFIJHXN7sQ.png" /></figure><blockquote>This isn’t a technical guide or anything, this is just a walkthrough of how we built an AI assistant for our mobile app.</blockquote><p>The thought of building such a feature into our app seemed far-fetched, if not impossible with the time constraint — but once OpenAI made their APIs public it seemed as though a floodgate had been opened.</p><p>The goal of the AI assistant was to have our users interact with the app using chat — something similar to how google assistant works.</p><h4>These are the problems we needed to solve in order to achieve this:</h4><ul><li>What function of the app is the user trying to use?</li><li>What parameters are they trying to input into the function?</li><li>Do we need to extract more information from the user?</li></ul><p>As it turns out ChatGPT is pretty good at solving these problems. So our plan was to become the middleman between our users and ChatGPT. The user would enter a prompt and we’d wrap that prompt with our own where we instruct ChatGPT to:</p><ol><li>Identify what the user is trying to do.</li><li>Extract what parameters the user is trying to enter— I later learned this process is called named entity recognition.</li><li>Check for missing parameters.</li><li>Ask for the missing parameters.</li></ol><p>We then ask ChatGPT to package the data up in a nice and easily understandable format — JSON. We can then read the JSON object in our app and execute the function our user intended to use with the data they provided. Here’s a diagram to easily visualize the process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2oFlvtfvZYa0ndicV_TbSQ.png" /></figure><p>And that’s really all. The concept is there. All that’s really left is the engineering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abe32d224ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless: Integrating AWS ApiGateway with SQS with Authentication]]></title>
            <link>https://medium.com/@dp.brackin/queueserverless-integrating-aws-apigateway-with-sqs-with-authentication-b6e76341232b?source=rss-9898e2e7c688------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6e76341232b</guid>
            <category><![CDATA[sqs]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[David Brackin]]></dc:creator>
            <pubDate>Tue, 31 May 2022 04:58:09 GMT</pubDate>
            <atom:updated>2022-06-24T09:02:06.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmhkcM6jv5tk9rCljqALYg.png" /></figure><p>This is a short but sweet technical guide on how to send messages directly from <strong>AWS APIGateway to SQS with authentication</strong> using <a href="https://www.serverless.com/"><strong>Serverless Framework.</strong></a><strong> </strong>I’m writing this because when I had to transform a synchronous API into an asynchronous one, I didn’t find many resources on this exact problem.</p><h4>Install the serverless-apigateway-service-proxy plugin</h4><p>Out of the box, Serverless does not support this kind of integration. Thankfully, someone has already done the hard work of creating a <a href="https://www.npmjs.com/package/serverless-apigateway-service-proxy">plugin</a> to do the job.</p><pre>serverless plugin install -n serverless-apigateway-service-proxy</pre><h4><strong>Create your queue resources</strong></h4><p>Before we get started with integrating APIGW with SQS let’s create the queue that we will be sending our messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fj99DCOiWFZ8THszUpcjXA.png" /></figure><p>The dead letter queue is not required but is a recommended addition. The visibility timeout should be at least 6 times the timeout of the downstream service that will read the messages. In this case, our downstream service is a lambda function with a timeout of 30 seconds.</p><h4>Configure the API Gateway Service Proxy</h4><p>The plugin itself will do most of the heavy lifting but we still do need to put in some work.</p><figure><img alt="Sample configuration for serverless-apigateway-service-proxy plugin" src="https://cdn-images-1.medium.com/max/1024/1*QZ7JTFdkisCy79hhreB-9Q.png" /><figcaption>Sample config</figcaption></figure><p>You’ll find that the configuration above isn’t too different from the sample given in the <a href="https://github.com/serverless-operations/serverless-apigateway-service-proxy#sqs">documentation</a>. The only thing I’d like to highlight is the <a href="https://github.com/serverless-operations/serverless-apigateway-service-proxy#sqs-1">template customization</a>. Though VTL is a very powerful templating language I found it difficult to convert a map to a JSON string since AWS did not provide a <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-template-reference">util function</a> for it. This made it difficult to include other information in the SQS message such as an authorizer context. Luckily there’s still the option of adding it into the message attributes — which is the route I went with.</p><h4>Adding a custom authorizer</h4><p>The plugin also covers adding an authorizer for the API but its <a href="https://github.com/serverless-operations/serverless-apigateway-service-proxy#adding-authorization">documentation</a> did not go too in-depth into adding a custom authorizer.</p><p>If you have an existing authorizer and you have knowledge of its ID then you can just add the authorizer’s ID into the configuration like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WhRsJsMIuJgIFs4miWchFw.png" /></figure><p>I, personally, wouldn’t recommend this.</p><p><a href="https://www.serverless.com/framework/docs/providers/aws/events/http-api#lambda-request-authorizers">Serverless allows you to attach an authorizer for your APIs</a> and if you’ve already done that you can get the reference of that authorizer.</p><p>In our case, we had a lambda function that belonged to another stack which I can reference using its ARN. With that, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html">we can create a new authorizer resource in our stack that uses that lambda function</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3lGOlFahfOf05943gd5r-Q.png" /></figure><p>We can then get the ID of this authorizer using the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html">ref</a> intrinsic function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uqtPoUPCp16K7jCWwGstQg.png" /></figure><p>And just like that your API can now send messages to SQS with authorization.</p><h4><strong>Adding the lambda trigger</strong></h4><p>At this point, the messages in your queue can be read by any other service (that’s up to you) but to finish this off let’s just add a lambda trigger to have a lambda function ingest the queue messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iGYHslvE5Jr9X6UvVHjJyg.png" /></figure><p>And that’s it. The actual code for reading the message is no longer covered in this article but you can get started <a href="https://www.serverless.com/framework/docs/providers/aws/events/sqs">here</a>.</p><p>Thank you for reading. I hope you found this helpful. If you found anything here to be inaccurate just leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6e76341232b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>