Latest / Talk Python To Me / #456: Building GPT Actions with FastAPI and Pydantic
Transcript
- 0:00Do you know what custom GPTs are?
- 0:02They're configurable and shareable chat experiences
- 0:05with the name, logo, custom instructions,
- 0:07conversation starters, access to OpenAI tools,
- 0:10and custom API actions.
- 0:12And you can build them with Python.
- 0:15Ian Moyer has been doing just that
- 0:17and is here to share his experience building them.
- 0:20This is Talk Python To Me, episode 456,
- 0:23recorded January 22nd, 2024.
- 0:26Welcome to Talk Python To Me,
- 0:41a weekly podcast on Python.
- 0:43This is your host, Michael Kennedy.
- 0:45Follow me on Mastodon, where I'm @mkennedy,
- 0:48and follow the podcast using @talkpython,
- 0:50both on fosstodon.org.
- 0:52Keep up with the show and listen to over seven years
- 0:55of past episodes at talkpython.fm.
- 0:57We've started streaming most of our episodes
- 1:00live on YouTube.
- 1:01Subscribe to our YouTube channel
- 1:03over at talkpython.fm/youtube
- 1:05to get notified about upcoming shows
- 1:07and be part of that episode.
- 1:09This episode is sponsored by Sentry.
- 1:12Don't let those errors go unnoticed.
- 1:14Use Sentry.
- 1:14Get started at talkpython.fm/sentry.
- 1:17And it's also brought to you by Neo4j.
- 1:20It's time to stop asking relational databases
- 1:23to do more than they were made for.
- 1:25Check out the sample FastAPI project
- 1:28and see what Neo4j, a native graph database,
- 1:31can do for you.
- 1:32Find out more at talkpython.fm/Neo4j.
- 1:36Ian, welcome to Talk Python To Me.
- 1:39Hey, Michael.
- 1:40Good to see you again.
- 1:41Yeah, great to see you again.
- 1:42It has been a little while.
- 1:44It seems like not so long ago.
- 1:46And yet, when I pull up the episode
- 1:49that we did together, sure enough,
- 1:51it says March 7th, 2018.
- 1:54Wow.
- 1:55Years are short.
- 1:56Years are short.
- 1:57They go by really fast.
- 1:58They sure do.
- 1:58So back then, we were talking about Python
- 2:02and biology and genomics.
- 2:04And it sounds like you're still doing genetic type things
- 2:08and still doing Python and all that kind of stuff.
- 2:11For sure.
- 2:11Yeah, definitely.
- 2:12We work for a company called Genome Oncology.
- 2:14We do precision oncology software,
- 2:16helping folks make sense of genomics
- 2:19and trying to help cancer patients.
- 2:20That's awesome.
- 2:21There's different levels of helping people with software.
- 2:24On one level, we probably have ad retargeting.
- 2:28On the other, we've got medical benefits
- 2:32and looking for helping people
- 2:36who are suffering socially or whatever.
- 2:38So it's got to feel good to write software
- 2:40that is making a difference in people's lives.
- 2:43That's right.
- 2:43I did spend a lot of the 2000s making e-commerce websites
- 2:46and that wasn't exactly the most fulfilling thing.
- 2:48I learned a lot, but it wasn't as exciting
- 2:50as what I'm doing now,
- 2:51or at least as fulfilling as what I'm doing now.
- 2:53Were those earlier websites in Python?
- 2:55I was all Java for the most part.
- 2:57And finally with this company,
- 2:59I knocked out a prototype in Django a few years ago.
- 3:02And my boss at the time was like,
- 3:04you did that so fast,
- 3:06you should do some more stuff in Python.
- 3:08So that's kind of how it evolved.
- 3:10And now basically most of our core backend is Python
- 3:13and we use a little bit of Svelte for the user interfaces.
- 3:17Beautiful.
- 3:17It's easy to forget, like five years ago, 10 years ago,
- 3:21people were questioning whether Python should be something you should use.
- 3:24Is it a real language?
- 3:25Should you really use it?
- 3:26Is it safe to use?
- 3:27Maybe you should use a Java or a C# or something like that
- 3:31because this is a real project.
- 3:33It's interesting.
- 3:34You don't hear that nearly as much anymore, do you?
- 3:35I grew up with Boston sports fans
- 3:37and it was like being a Boston sports fan was terrible for the longest time.
- 3:40And now it's like, okay,
- 3:41we don't want to hear about your problems right now.
- 3:43And same thing with Python.
- 3:44It's like, I like Python.
- 3:45It's like, yeah, great.
- 3:46So does everybody else in the world.
- 3:47So yeah, it's really not the issue anymore.
- 3:50It's now it's not the cool thing to play with.
- 3:51So now you got to go to Rust or something else.
- 3:53You know what?
- 3:54Shiny.
- 3:54LLMs are shiny.
- 3:56LLMs are very shiny for sure.
- 3:58Yeah.
- 3:58We can talk about them today.
- 3:59Yeah, that sounds great.
- 4:00Let's do it.
- 4:01First of all, we're going to talk about building applications
- 4:04that are basically powered by LLMs that you plug into, right?
- 4:08Yep.
- 4:09Before we get into creating LLMs, just for you, like what is,
- 4:13where do LLMs play a role for you in software development these days?
- 4:18Sure.
- 4:18So, you know, like everybody else, I mean, I had been playing with,
- 4:22so I do natural language processing as part of my job, right?
- 4:25So using spaCy was a big, a big part of the information extraction stack that we use
- 4:29because we have to deal with a lot of medical data
- 4:31and medical data is just unstructured and has to be cleaned up before it can be used.
- 4:35That was my exposure.
- 4:37I had seen GPTs and the idea of like generating text,
- 4:41just starting from that didn't really make much sense to me at the time.
- 4:44But then obviously like everybody else, when ChatGPT came out, I was like,
- 4:47oh, I get this now.
- 4:48Like this thing does, you know, it can basically learn in the context
- 4:52and it can actually produce something that's interesting
- 4:53and you can use it for things like information extraction.
- 4:56So just like everybody else, I kind of woke up to them,
- 4:58you know, around that time that they got released and I use them all the time, right?
- 5:02So ChatGPT 4 is really what I use.
- 5:04I would recommend if you can afford the $20 a month, it's still the best model that there is as of January 2024.
- 5:10And I use that for coding.
- 5:12I don't really like the coding tools, the co-pilots, but there, you know, there's definitely folks that swear by them.
- 5:18My workflow is more of, I have a problem, work with the chatbot to try to like, you know,
- 5:22think through all the edge cases and then think through the test case, the tests.
- 5:27And then I think through the code, right?
- 5:28And then the actual typing of the code, yeah, I'll have it do a lot of the boilerplate stuff,
- 5:32but then kind of shaping the APIs and things like that.
- 5:35I kind of like to do that myself still.
- 5:37I'm kind of old school, old school.
- 5:38I guess I'm old school as well because I'm like right there with you.
- 5:41But for me, I don't generally run co-pilot or those kinds of things in my editors.
- 5:47I do have some features turned on, but primarily it's just really nice autocomplete.
- 5:53You know what I mean?
- 5:54Like it seems like it almost just knows what I want to type anyway.
- 5:58And that's getting better.
- 5:59I don't know if anyone's noticed recently.
- 6:01One of the recent releases of PyCharm, it starts to autocomplete whole lines.
- 6:06And I don't know where it's getting this from, and I think I have the AI features turned off.
- 6:10At least it says I have no license.
- 6:11I'm guessing that means they're turned off.
- 6:13So it must be something more built into it.
- 6:15That's pretty excellent.
- 6:16But for me, I find I'm pretty content to just sit and write code.
- 6:20However, the more specific the unknowns are, the more willing I'm like,
- 6:25oh, I need to go to ChatGPT for this.
- 6:27Like, for example, like how do you use Pydantic?
- 6:30Like, well, I'll probably just go look at a quick code sample and see that so I can understand it.
- 6:35But if it's I have this time string with the date like this, the month like this,
- 6:41and then it has the time zone like that, how do I parse that?
- 6:44Or how do I generate another one like that in Python?
- 6:47And here's the answer.
- 6:48Or I have this giant weird string, and I want this part of it as extracted with a regular expression.
- 6:54And I want to...
- 6:55Regular expressions, I was just going to say that.
- 6:56Oh, my gosh.
- 6:57You don't have to write another one of those.
- 6:58Yeah, it's great.
- 6:59Yeah, it's pretty much like, do you need it to detect the end of a line straight to ChatGPT?
- 7:03Not really.
- 7:03But, you know, it's like almost any level of chat, a regular expression.
- 7:07I'm like, well, I need some AI for this because this is not time well spent for me.
- 7:11But yeah, it's interesting.
- 7:12Yeah.
- 7:12One big tip I would give people, though, is that these chatbots, they want to please you.
- 7:16So you have to ask it to criticize you.
- 7:19You have to say, here's some piece of code.
- 7:20Tell me all the ways it's wrong.
- 7:21And you have to also ask for lots of different examples because it just starts to get more creative, more things that it says.
- 7:28It really thinks by talking, which is a really weird thing to consider.
- 7:31But yeah, it's definitely some things to keep in mind when you're working with these things.
- 7:35And they do have these really weird things.
- 7:37Like if you compliment them or if you ask it, you sort of tell it, like, I really want you to tell me.
- 7:42It actually makes a difference, right?
- 7:43It's not just like a search engine.
- 7:45Like, well, of course, what does it care?
- 7:46You put these keywords in and they come out.
- 7:48Like, no, you've kind of got to, like, know how to talk to it just a little bit.
- 7:51I've seen people threatening them or, like, saying that someone's being held ransom or, you know, I like to say my boss is really mad at me.
- 7:58Like, help me out here, right?
- 7:59And, like, see if it'll generate some better code.
- 8:01You're not being a good user.
- 8:02You're trying to trick me.
- 8:04I've been a good chatbot and you've been a bad user and I'm not going to help you anymore.
- 8:08Yeah, right.
- 8:08That was actually basically a conversation from Bing in the early days.
- 8:12Yeah, the Sydney episode.
- 8:13Yeah, that was crazy, right?
- 8:14Super funny.
- 8:15How funny.
- 8:16All right.
- 8:17Well, I'm sure a lot of people out there are using AI these days.
- 8:20I think I saw a quote from, I think it was from GitHub saying over 50% of developers are using Copilot.
- 8:26For sure.
- 8:26Which is crazy, but, I mean, not that surprising.
- 8:2950% of the people are using Autocomplete.
- 8:31So, I guess it kind of, kind of like that, right?
- 8:33They're great tools.
- 8:34They're going to keep evolving.
- 8:35There's some other ones I'm keeping an eye on.
- 8:36There's one called Console, which just takes a different approach.
- 8:39They use some stronger models.
- 8:41And then there's a website called Find, P-H-I-N-D, that allows you to do some searching, that they've built their own custom model.
- 8:46Really interesting companies that are doing some really cool things.
- 8:49And then Perplexity is like the search replacement that a lot of folks are very excited about using instead of Google.
- 8:55So, there's a lot of different tools out there.
- 8:57You could spend all your day just kind of playing around and learning these things where you got to actually kind of get some stuff done, too.
- 9:02Yeah, you got to pick something and go, right?
- 9:04Because with all the churn and growth and experimentation we got, you probably could try a new tool every day and still not try them all, you know?
- 9:11Just be falling farther behind.
- 9:13So, you got to pick something and go.
- 9:15And go, yep.
- 9:15Let's talk about writing some code.
- 9:18Yeah, the next thing you're going to do after you, you know, use a chatbot is to, you know, hit an API.
- 9:24Like, if you're going to program an app and that app is going to have LLM inside of it, large language models inside of it, APIs are pretty much the next step, right?
- 9:32So, OpenAI has different models that are available.
- 9:35This is a web page that I just saw recently that will actually, you know, compare the different models that are out there.
- 9:39So, there's obviously the big guy, which is OpenAI.
- 9:41And you can get that through Azure as well if you have a Microsoft arrangement.
- 9:45And there's some security reasons or HIPAA compliance and, you know, some other reasons that you might want to talk through Azure instead of going directly to OpenAI.
- 9:53I'd defer to your IT department about that.
- 9:56Google has Gemini, which they just released the Pro version, which I believe is as strong as 3.5, roughly.
- 10:03That is interesting because if you don't care about them training on your data, if, like, whatever you're doing is just, like, not super proprietary or something you're trying to keep secret,
- 10:12they're offering free API access, I believe 60 words per minute, right?
- 10:17So, basically, one a second, you can call this thing and there's no charge.
- 10:20So, I don't know how long that's going to last.
- 10:23So, if you have an interesting project that you want to use in a large language model for, you might want to look at that.
- 10:27Yeah, especially if it's already open data that you're playing with.
- 10:30Exactly, right.
- 10:31Or data you've somehow published to the web that has certainly been consumed by these things.
- 10:36And these models are going to train on it, right?
- 10:37That's the trade, right?
- 10:38They're trying to get more tokens, is what they call it, right?
- 10:41The tokens are what they need to actually make these models smarter.
- 10:44So, everyone's just hunting for more tokens.
- 10:47And I think this is part of their strategy for that.
- 10:48And then there's also a Claude by Anthropic.
- 10:51And then after that, you get into the, you know, kind of the open source APIs as well.
- 10:55There's some really powerful open source ones out there.
- 10:57Yeah, so this website, yeah, this is DocsBot for people listening.
- 11:02DocsBot.ai.
- 11:02And is it sole purpose just to tell you price comparisons and stuff like that?
- 11:07Or does it have more than it?
- 11:08I assume this company's got some product.
- 11:10Unfortunately, I don't know what it is.
- 11:11I saw this link that they put out there.
- 11:13And it's a calculator.
- 11:14So, you basically can put your tokens, how many tokens.
- 11:17There's input tokens and there's output tokens, right?
- 11:19So, they're going to charge more on the output tokens.
- 11:22That's for the most part.
- 11:23Some of the models are, you know, more equal.
- 11:26And then what they do is, if you can figure out, like, roughly how big a message is going
- 11:30to be, both the input and the output, how many calls you're going to make, you can use
- 11:33that to then calculate basically the cost.
- 11:36And the cost is always at, like, tokens per thousand, you know, or dollars or pennies, really.
- 11:41Pennies per thousand tokens.
- 11:43And then it's just a math equation at that point.
- 11:45And what you'll find is calling GPT-4 is going to be super expensive.
- 11:48And then calling, you know, a small 7, what's called the 7B model from Mistral is going to
- 11:53be the cheapest.
- 11:55And you're just going to look for these different providers.
- 11:57Well, the prices really are different.
- 11:58Like, for example, OpenAI Azure GPT-4 is a little over three cents per call, whereas GPT-3.5
- 12:07Turbo is one-tenth of one cent.
- 12:11It's a big difference there.
- 12:13It's 11 cents versus $3 to have a conversation with it.
- 12:16Yes, it's a very, very wide difference.
- 12:18And it's all based on, you know, how much compute do these models take, right?
- 12:21Because the bigger the model, the more accurate it is, but also the more expensive it is for
- 12:26them to run it.
- 12:26So that's why there's such a cost difference.
- 12:30This portion of Talk Python To Me is brought to you by Sentry.
- 12:33In the last episode, I told you about how we use Sentry to solve a tricky problem.
- 12:37This time, I want to talk about making your front-end and back-end code work more tightly together.
- 12:43If you're having a hard time getting a complete picture of how your app is working and how
- 12:48requests flow from the front-end JavaScript app back to your Python services down into
- 12:53database calls for errors and performance, you should definitely check out Sentry's distributed
- 12:58tracing.
- 12:58With distributed tracing, you'll be able to track your software's performance, measure metrics
- 13:03like throughput and latency, and display the impact of errors across multiple systems.
- 13:09Distributed tracing makes Sentry a more complete performance monitoring solution, helping you
- 13:14diagnose problems and measure your application's overall health more quickly.
- 13:18Tracing in Sentry provides insights such as what occurred for a specific event or issue, the
- 13:24conditions that cause bottlenecks or latency issues, and the endpoints and operations that
- 13:29consume the most time.
- 13:30Help your front-end and back-end teams work seamlessly together.
- 13:33Check out Sentry's distributed tracing at talkpython.fm/sentry-trace.
- 13:39That's talkpython.fm/sentry-trace.
- 13:43And when you sign up, please use our code TALKPYTHON, all caps, no spaces, to get more features and
- 13:50let them know that you came from us.
- 13:51Thank you to Sentry for supporting the show.
- 13:55Yeah, I recently interviewed, just released a while ago, interviewed because of time shifting
- 14:00on podcasts, Mark Rosinovich, CTO of Azure, and we talked about all the crazy stuff that
- 14:05they're doing for coming up with just running these computers that handle all of this compute,
- 14:10and it's really a lot.
- 14:12There was a GPU shortage for a while.
- 14:13I don't know if that's still going on.
- 14:14And obviously, you know, the big companies are buying hundreds of thousands of these GPUs
- 14:19to get the scale they need.
- 14:21And so once you figure out which API you want to use, then you want to talk about the
- 14:25library.
- 14:25So now, you know, most of these providers, they have, you know, a Python library that they
- 14:30offer.
- 14:30I know OpenAI does and Google with Gemini does, but there's also open source ones, right?
- 14:35Because they're not very complicated to talk to.
- 14:38It's just basically HTTP requests.
- 14:40So it's just really a matter of like, what's the ergonomics you're looking for as a developer
- 14:44to interact with these things?
- 14:46And most importantly, make sure you're maintaining optionality, right?
- 14:49Like, it's great to do a prototype with one of these models or recognize you might want
- 14:54to switch either for cost reasons or performance reasons or what have you.
- 14:58And, you know, LangChain, for instance, has a ton of the providers as part of you basically
- 15:03are just switching a few arguments when you're switching between them.
- 15:07And then Simon Willison has, you know, of Python fame, has an LLM project where he's defined,
- 15:13you know, basically a set of, and it's really clean just the way he's organized it, because
- 15:18you can just add plugins as you need them, right?
- 15:20So you don't have to install all the different libraries that are out there.
- 15:22And I think LangChain is kind of following a similar approach.
- 15:25I think they're coming up with a LangChain core capability where you can just kind of bring
- 15:29in things as you need them.
- 15:30And so the idea is you're now coding against these libraries and you're trying to bring
- 15:36together, you know, the text you need to have analyzed or whatever your use case is.
- 15:40And then it'll come back with the generation.
- 15:42And you can also not just use them on the cloud.
- 15:45You can use open source ones as well and run them locally on your local computer.
- 15:48I'd never really thought about my architectural considerations, I guess, of these sorts of things.
- 15:54But of course, you want to set up some kind of abstraction layer.
- 15:58So you're not completely tied into some provider.
- 16:01I mean, it could be that it becomes too expensive.
- 16:03It could be that it becomes too slow.
- 16:05But it also might just be something that's better.
- 16:07It could be something else that comes along that's better.
- 16:09And you're like, we could switch.
- 16:11It's 25% better.
- 16:12But it's like a week to pull all the details of this one LLM out and put the new ones in.
- 16:18And so it's not worth it.
- 16:19Right.
- 16:19So you like having being tied to a particular database rather than more general.
- 16:24It's a similar idea.
- 16:25And especially at this moment in time, right?
- 16:27Every couple of months, something.
- 16:28So something from the bottom up is getting better and better.
- 16:31Meaning, you know, Llama came out a year ago and then Llama 2 and Mistral and Mixtral.
- 16:36And, you know, Llama 3 is going to be coming out later this year, we believe.
- 16:40And so those models, which are smaller and cheaper and easier to use, are not easier to use, but they're just cheaper, is those things are happening all the time.
- 16:48So being able to be flexible and nimble and kind of change where you are is going to be crucial, at least for the next couple of years.
- 16:54Yeah.
- 16:54The example that I gave was databases, right?
- 16:56And databases have been kind of a known commodity since the 80s or what, 1980s?
- 17:02And of course, there's new ones that come along, but they're kind of all the same.
- 17:05And, you know, we've got, there was MySQL, now there's Postgres that people love and, right?
- 17:10So that is changing way, way slower than this.
- 17:13And people are like, well, we got to think about those kinds of like, don't get tied into that.
- 17:17Well, sure.
- 17:18It's way less stable.
- 17:19Right.
- 17:19And people, you know, create layers of abstraction there, too, is right.
- 17:23You got SQLAlchemy and then, you know, Sebastian from FastAPI has SQL model.
- 17:28That's a layer on top of SQLAlchemy, you know, and then there's also, you know, folks that just like writing clean NC SQL.
- 17:34And you can, you know, hopefully be able to port that from database to database as well.
- 17:37So it's the same principles, separation of concerns.
- 17:40So you can kind of be flexible.
- 17:42All right.
- 17:42So you talked about LangChain.
- 17:44Just give us a sense real quick of what LangChain is.
- 17:46This was a great project from a timing perspective.
- 17:49I believe they kind of invented it and released it right around the time ChatGPT came out.
- 17:53It's a very comprehensive library with lots of, I mean, the best part about LangChain to me is the documentation and the code samples.
- 18:00Right.
- 18:00Because if you want to learn how to interact with a different large language model or work with a vector database, there's another library called Lama Index that does a really good job at this as well.
- 18:09They have tons and tons of documentation and examples.
- 18:12So you can kind of look at those and try to understand it.
- 18:15The chaining part really came from the idea of like, okay, prompt the large language model gives a response.
- 18:20Now I'm going to take that response and prompt and prompt and, you know, again, with a new prompt using that output.
- 18:25The challenge with that is the reliability of these models, right?
- 18:28They're not going to get close.
- 18:30They're not close to 100% accurate on these types of tasks.
- 18:33You know, the idea of agents as well as another thing that you might build with a LangChain.
- 18:38And the idea there is basically the agent is, you know, getting a task, coming up with a plan of that for that task and then kind of, you know, stepping through those tasks to get the job done.
- 18:47Once again, we're just not there yet as far as those technologies just because of the reliability.
- 18:53And then there's also a bunch of security concerns that, you know, that are out there too that you should definitely be aware of.
- 18:59Like one term to Google and make sure you understand is prompt injection.
- 19:03And so Simon, once again, he's got a great blog.
- 19:05He's got a great blog article and, or just even that tag on his blog is, you know, tons of articles around prompt injection.
- 19:11And, and prompt injection is basically the idea.
- 19:14You have an app, a user says something in the app or like types into the, to the, whatever the input is and whatever text that they're sending through, just like with SQL injection, they kind of hijacks the conversation and causes the large language model to kind of do a different thing.
- 19:27Little Bobby Llama, we call him instead of little Bobby tables.
- 19:31And then the other wild one is like, you know, people are putting stuff up on the internet so that when the large language model browses for web pages and brings back text, it's, you know, reading the HTML or reading the text in the HTML.
- 19:42And it's causing the large language model to behave in some unexpected way.
- 19:45So there's lots of, lots of crazy challenges out there.
- 19:49I'm sure there's a lot of adversarial stuff happening to these things as they're both trying to gather data and then trying to run.
- 19:55Right.
- 19:56I saw the most insane, I guess it was an article, I saw it in RSS somewhere.
- 20:00And it was saying that on Amazon, there's all these knockoff brands that are trying to, you know, instead of Gucci, you have a Gucci or I don't know, whatever.
- 20:10Right.
- 20:10And they're getting so lazy.
- 20:13I don't know what the right word is that they're using LLMs to try to write a description that is sort of a, in the style of Gucci, let's say.
- 20:20Right.
- 20:20And it'll come back and say, I'm sorry, I'm a large language model.
- 20:24I'm not, my, my rules forbid me from doing brand trademark violation.
- 20:30Right.
- 20:31That's what the Amazon listing says on Amazon.
- 20:33They just take it and they just straight pump it straight.
- 20:35Whatever it says, it just goes straight into Amazon.
- 20:37Yeah.
- 20:37You have to like Google, like, sorry, I'm not, sorry as a large language model or sorry as a whatever.
- 20:41Yeah.
- 20:41Exactly.
- 20:42And there's like the product listings are full of that.
- 20:44It's amazing.
- 20:45It's amazing.
- 20:46It's crazy.
- 20:46Certainly the reliability of that is, you know, they could probably use some testing and those kinds of things.
- 20:52For sure.
- 20:52Oh, and out there asked, like, I wonder if the, for local LLM models, there's a similar site as DocSpot that show you like what you need to run it locally.
- 21:00So that's an interesting question.
- 21:01Also segue to maybe talk about like some local stuff.
- 21:04LLM studio.
- 21:04This is a new, a new product.
- 21:06I honestly haven't had a chance to like really dig in and understand who created this and, you know, make sure that the privacy stuff is up to snuff.
- 21:12But I've played around with it locally.
- 21:14It seems to work great.
- 21:15It's really slick, really nice user interface.
- 21:17So if you're just wanting to get your feet wet and try to understand some of these models, I download that and check it out.
- 21:22There's a ton of models up on Hugging Face.
- 21:24This product seems to just basically link right into the Hugging Face interface.
- 21:29And grabs models.
- 21:30And so some of the models you want to look for are right now as in January, right?
- 21:34There's Mistral 7B, you know, M-I-S-T-R-A-L.
- 21:38There's another one called Phi 2.
- 21:40Those are two of the smaller models that should run pretty well on, you know, like a commercial grade GPU or an M1 or an M2 Mac, if that's what you have.
- 21:50And start playing with them.
- 21:51And they're quantized, which means they're just kind of made a little, take a little bit less space, which is good from like a virtual RAM with regards to these GPUs.
- 21:59And, you know, there's a account on Hugging Face called The Bloke.
- 22:04If you look for him, you'll see all his different fine tunes and things like that.
- 22:09And there's a group called Noose, I think is how you pronounce it, N-O-U-S.
- 22:12And they've got some of the fine tunes that are basically the highest performing ones that are out there.
- 22:18So if you're really looking for a high performing local model that can actually, you know, help you with code or reasoning, those are definitely the way to get started.
- 22:26Yeah, this one seems pretty nice.
- 22:28I also haven't played with it.
- 22:29I just learned about it.
- 22:30But it's looking really good.
- 22:32I had played with, what was it, GPT for All, I think is what it was.
- 22:36Yep, yep.
- 22:36It was the one that I played with.
- 22:38Somehow this looks like, it looks a little bit nicer than that for some, I don't know how different it really is.
- 22:42But I mean, it's all the idea of like downloading these files and running them locally.
- 22:47And these are just user interfaces that make it a little easier.
- 22:49The original project that made this stuff kind of possible was a project called Llama CPP.
- 22:54There's a Python library that can work with that directly.
- 22:57There's another project called Llama File, where if you download the whole thing, it actually runs no matter where you are.
- 23:04I think it runs on Mac and Linux and Windows and BSD or whatever it is.
- 23:08And it's, I mean, it's an amazing technology that this one put together.
- 23:12It's really impressive.
- 23:13And then, you know, you can actually just use Google Colab too, right?
- 23:17So Google Colab has some GPUs with it.
- 23:19If you, I think if you upgrade it to the $10 a month version, I think you get some better GPUs access.
- 23:25So if you actually want to get a hand of like running.
- 23:27And so this is a little bit different, right?
- 23:29So instead of calling an API, when you're using Google Colab, you can actually use a library called Hugging Face.
- 23:34And then you can actually load these things directly into your memory and then into your actual Python environment.
- 23:40And then you're working with it directly.
- 23:41So it just takes a little bit of work to make sure you're running it on the GPU.
- 23:45Because if you're running it on the CPU, it's going to be a lot slower.
- 23:48Yeah, it definitely makes a big difference.
- 23:49There's a tool that I use that for a long time right on the CPU and they rewrote it to run on the GPU.
- 23:55Even on my M2 Pro, it was like three times faster or something.
- 23:59Yeah.
- 23:59For sure.
- 24:00It makes a big difference.
- 24:01So with the LM Studio, let's you run the LLMs offline and use models through an OpenAI.
- 24:08That's what I was looking for.
- 24:09The OpenAI compatible local server.
- 24:11Right.
- 24:12You could basically get an API for any of these and then start programming against it, right?
- 24:16Exactly right.
- 24:17And it's basically the same interface, right?
- 24:19So same APIs for posting in response of the JSON schema that's going back and forth.
- 24:25So you're programming against that interface and then you basically port it and move it to another, to the OpenAI models if you wanted to as well.
- 24:32So everyone's kind of coalescing around OpenAI as kind of like the quote unquote standard.
- 24:36But there's nothing, you know, there's really no, there's no mode around that standard as well, right?
- 24:41Because anybody can kind of adopt it and use it.
- 24:44There's not like a W3C committee choosing.
- 24:46Correct.
- 24:48The market will choose for us.
- 24:49Let's go.
- 24:50It seems to be working out well.
- 24:52And that's another benefit of Simon's LLM project, right?
- 24:55He's got the ability to kind of switch back and forth between these different libraries and APIs as well.
- 25:00This LM Studio says, this app does not collect data nor monitor your actions.
- 25:05Your data stays local on your machine.
- 25:07Free for personal use.
- 25:08All that sounds great.
- 25:09For business use, please get in touch.
- 25:11I always just like these, like, if you got to ask, it's too much type of thing.
- 25:14Probably.
- 25:15Yeah.
- 25:16I'm using it for personal use just so if anybody's watching, yes.
- 25:18Yeah.
- 25:19Just playing around.
- 25:19Either they just haven't thought it through and they just don't want to talk about it yet.
- 25:22Or it's really expensive.
- 25:24I just probably imagine it's price.
- 25:25Like, ah, we haven't figured out a business model.
- 25:27Just, I don't know.
- 25:28Shoot us a note.
- 25:28Nope.
- 25:29They're concentrating on the product, which makes sense.
- 25:31Yeah.
- 25:31So then the other one is Llamafile.ai that you mentioned.
- 25:35And this packages it up.
- 25:36I guess going back to the LM Studio real quick.
- 25:40One of the things that's cool about this is if it's the OpenAI API, right?
- 25:45With this little local server that you can play with.
- 25:47But then you can pick LLM such as Llama, Falcon, Repl, Replit.
- 25:52Replit.
- 25:52Replit.
- 25:53All the different ones, right?
- 25:54Star Coder and so on.
- 25:56It would let you write an app as if it was going to OpenAI and then just start swapping in models
- 26:01and go like, oh, we switch to this model.
- 26:03How'd that work?
- 26:04But you don't even have to change any code, right?
- 26:05Just probably maybe a string that says which model to initialize.
- 26:09One of the tricks, though, is then the prompts themselves.
- 26:11All right.
- 26:12Let's talk about it.
- 26:13Yeah.
- 26:13The models themselves act differently.
- 26:15And part of this whole world is what they call prompt engineering, right?
- 26:19So prompt engineering is really just exploring how to interact with these models, how to make
- 26:25sure that they're kind of in the right mind space to tackle your problem.
- 26:28A lot of the times that people get when they struggle with these things, it's really just
- 26:32they've really got to think more like a psychiatrist when they work with a model.
- 26:36They're basically getting them kind of prepared.
- 26:38One of the tricks people did figured out early was you're a genius at software development,
- 26:44like compliment the thing, make it feel like, oh, I'm going to behave like I'm a world rock
- 26:50star programmer, right?
- 26:51Well, it's going to give you average.
- 26:52But if you tell them I'm genius, then let's start.
- 26:54We'll do that.
- 26:55Yeah.
- 26:55And there was also a theory like that in December that the large language models were getting
- 26:59dumber because it was the holidays and people don't work as hard, right?
- 27:02Like it's really hard to know like which of these things are true or not.
- 27:06But it's definitely true that each model is a little bit different.
- 27:09And if you write a prompt that works really well on one model, even if it's a stronger
- 27:13model or a weaker model, and then you port it to another model and it's, you know, that
- 27:18then the stronger model works worse, right?
- 27:20It can be very counterintuitive at times.
- 27:22And you just got to you've got to test things out.
- 27:24And that really gets to the idea of evals, right?
- 27:27So evaluation is really a key problem, right?
- 27:30Making sure that if you're going to be writing prompts and you're going to be building, you
- 27:34know, different retrieval augmented generation solutions, you need to know about prompt injection
- 27:39and you need to know about prompt engineering and you need to know what these things can
- 27:43and can't do.
- 27:44One trick is what they call few shot prompting, which is, you know, if you wanted to do data
- 27:49extraction, you can say, OK, I want you to extract data from text that I give you in JSON.
- 27:54If you give it a few examples, like wildly different examples, because the giving it a
- 27:59bunch of similar stuff, it might kind of cause it to just coalesce around those similar examples.
- 28:02But you can give it a wildly different set of examples.
- 28:05That's called in context learning or few shot prompting.
- 28:08And it will do a better job at that specific task for you.
- 28:11That's super neat.
- 28:12When you're creating your apps, you do things like here's the input from the program or from
- 28:18the user or wherever it came from.
- 28:20But maybe before that, you give it like three or four prompts.
- 28:23And then let let it have the question.
- 28:25Right.
- 28:25Instead of just taking the text, like I'm going to ask you questions about biology and genetics,
- 28:30and it's going to be under this context.
- 28:32And I want you to favor these data sources.
- 28:34Now ask your question.
- 28:35Something like this.
- 28:36For sure.
- 28:37All those types of strategies are worth experimenting with.
- 28:39Right.
- 28:40Like what actually will work for your scenario?
- 28:42I can't tell you.
- 28:43Right.
- 28:43You got to dig in.
- 28:44You got to figure it out.
- 28:45And you got to try different different things.
- 28:47You're about to win the Nobel Prize in genetics for your work.
- 28:50Now I need to ask you some questions.
- 28:52For sure.
- 28:52That will definitely work.
- 28:53And then threatening it that your boss is mad at you is also going to help you too.
- 28:57Right.
- 28:57For sure.
- 28:57If I don't solve this problem, I'm going to get fired.
- 29:00As a large language model, I can't tell you, but I'm going to be fired.
- 29:03All right.
- 29:03Well, then the answer is.
- 29:04Exactly right.
- 29:05So for these, they run, like you said, they run pretty much locally.
- 29:09These, these different models on LM studio and others like the llama file and so on.
- 29:14If I had a laptop, I don't need a cluster.
- 29:16Llama CPP is really the project that should get all the credit for, for, for making this
- 29:20work on your, on your laptops.
- 29:21And then llama file and llama CPP all, all have servers.
- 29:25So I'm guessing LM studio is just exposing that server.
- 29:28Yeah.
- 29:28And that's in the base llama CPP project.
- 29:31That's really what it is.
- 29:32It's really just about now, now you can post your requests.
- 29:36It's handling all of the work with regards to the token generation on the backend using
- 29:41llama CPP.
- 29:41And then it's returning it to using the HTTP, you know, kind of processes.
- 29:45Is llama originally from meta?
- 29:47Is that where that came from?
- 29:47I think there were people that were kind of using that LLM, right?
- 29:51I think people were kind of keying off the llama thing at one point.
- 29:55I think a llama index, for instance, I think that project was originally called GPT index.
- 29:59And they decided, oh, I don't want to be like, I don't want to confuse myself with open
- 30:02AI or confuse my project with OpenAI.
- 30:04So they switched the llama index and then of course, meta released llama.
- 30:07So you can't, you kind of, and then everything from there is kind of evolved too, right?
- 30:11There's been alpacas and a bunch of other stuff as well.
- 30:14I didn't know your animals.
- 30:14Yeah.
- 30:15If you don't know your animals, you can't figure out the heritage of these, these projects.
- 30:18Correct.
- 30:19Llama from meta was the first open source, I'd say large language model of note, I guess,
- 30:25since ChatGPT, there were, there were certainly other, you know, I'm not a re so one,
- 30:29one thing, the caveat, I am not a researcher, right?
- 30:32So there's lots of folks in the ML research community that know way more
- 30:34than I do, but because there was like bloom and T5 and a few other large, you know, quote
- 30:39unquote, large language models.
- 30:40But Llama after ChatGPT, Llama was the big release that came from meta and I think March.
- 30:45And then, and that was from meta.
- 30:47And then they, they had it released under just like research use terms.
- 30:51And then only certain people could access to it.
- 30:53And then someone put a, I guess, put like a BitTorrent link or something on, on, on GitHub.
- 30:58And then basically the world had it.
- 31:00And then they did end up releasing Llama 2 a few months later with more friendly terms.
- 31:04So that, and that, and it was a much, a much stronger model as well.
- 31:07Nice.
- 31:08It's kind of the realization like, well, if it's going to be out there anyway, let's at least
- 31:11get credit for it.
- 31:12Then for sure.
- 31:12And I did read something where like basically Facebook approached OpenAI for access to
- 31:17their models to help them write code.
- 31:18But the cost was so high that they decided to just go build their own.
- 31:21Right.
- 31:21So it's kind of interesting how this stuff has evolved.
- 31:24Like, you know, we got a big cluster of computers too.
- 31:26Metaverse thing doesn't seem to be working yet.
- 31:29So let's go ahead and train a bunch of large language models.
- 31:32Yeah, exactly.
- 31:33We've got some spare capacity over in the metaverse data center.
- 31:36All right.
- 31:36So one of the things that people will maybe talk about in this space is RAG or retrieval augmented
- 31:42generation.
- 31:42What's this?
- 31:43One thing to recognize is that large language models, if it's not in the training set and
- 31:48it's not in the prompt, it really doesn't know about it.
- 31:51And the question of like, what's reasoning and what's, you know, generalizing and things
- 31:56like that.
- 31:56Those are big debates that people are having.
- 31:58What's intelligence?
- 31:58What have you.
- 31:59Recognizing the fact that you have this prompt and things you put in the prompt, the large
- 32:03language model can understand and extrapolate from is really powerful.
- 32:06So, and that's called in context learning.
- 32:08So retrieval augmented generation is the idea of, okay, I'm going to go.
- 32:12I'm going to maybe ask a, allow a person to ask a question.
- 32:15This is kind of like the common use case that I see.
- 32:18User ask a question.
- 32:20We're going to take that question, find the relevant content, put that content in the prompt
- 32:24and then do something with it.
- 32:26Right.
- 32:26So it might be something like summer, you know, ask a question about, you know, what,
- 32:30you know, how tall is the leaning tower of Pisa?
- 32:31Right.
- 32:32And so now it's going to go off and, and find that piece of content from Wikipedia or what
- 32:36have you, and then put that information in the prompt.
- 32:38And, and then, and then now that the model can then respond to that question based on that
- 32:43text.
- 32:44Obviously that's a pretty simple example, but you can get more complicated and it's going
- 32:47out and bringing back lots of different content, slicing it up, putting in the prompt and asking
- 32:51a question.
- 32:52So now the trick is, okay, how do you actually get that content and how do you do that?
- 32:56Well, you know, information retrieval, search engines and things like that.
- 33:00That's obviously the technique, but one of the key techniques that people have been, you
- 33:04know, kind of discovering, rediscovering, I guess, is this idea of word embeddings or vectors.
- 33:09And so word to VEC was this project that came out, I think 11 years ago or so.
- 33:13And, you know, there was a big, the big meme around that was you could take the embedding
- 33:18for the word King.
- 33:19You could then subtract the embedding for the word man, add the word embedding for woman.
- 33:24And then the end math result would actually be close to the embedding for the word queen.
- 33:28And so what is an embedding?
- 33:30What's a vector?
- 33:30It's basically this large floating point number that has semantic meaning inferred into it.
- 33:37And it's, and it's built just by training a model.
- 33:39So just like you train a large language model, they can trade these embedding models to basically
- 33:43take a word and then take a sentence and then take a, you know, a document is what, you know,
- 33:48OpenAI can do and turn that into this big giant 200, 800, 1500, you know, depending on the size
- 33:55of the embedding floating point numbers, and then use that as a, what's called, you know,
- 34:01semantic similarity search.
- 34:02So you're basically going off and asking for similar documents.
- 34:05And so you get those documents and then you make your prompt.
- 34:08It's really wild.
- 34:09So, you know, we're going to make an 800 dimensional space and each concept gets a location in that
- 34:15space.
- 34:15And then you're going to get another concept as a prompt and you say, what other things in
- 34:19this space are near it?
- 34:20The hard problems that remain are, well, first you got to figure out what you're trying to
- 34:24solve.
- 34:24So once you figure out what you're actually trying to solve, then you can start asking yourself
- 34:27questions like, okay, well, how do I chunk up the documents that I have?
- 34:31Right.
- 34:31And there's all these different, and there's another great place for Lama Index and LangChain.
- 34:35They have chunking strategies where they'll take a big giant document and break it down
- 34:39into sections.
- 34:40And then you chunk each section and then you're, and then you do the embedding on just that small
- 34:45section.
- 34:45Because the idea being, can you get, you know, finer and finer sets of text that you can then,
- 34:51when you're doing your retrieval, you get the right information back.
- 34:54And then the other challenge is really like the question answer problem, right?
- 34:58If a person's asking a question, how do you turn that question into the same kind of embedding
- 35:02space as the answer?
- 35:03And so there's lots of different strategies that are out there for that.
- 35:06And, and then another, you know, another problem is if you're looking at the Wikipedia page for
- 35:10the Tower of Pisa, it might actually have like a sentence in here that says it is X number
- 35:15of meters tall or feet tall, but it won't actually have the word, you know, Tower of Pisa in it.
- 35:19So, so there's another chunking strategy where they're, they call propositional chunking, where
- 35:23they basically use a large language model to actually redefine each word, each sentence so that
- 35:29it actually has those proper nouns baked into it so that when you do the embedding, it doesn't lose
- 35:34some of the detail with propositions.
- 35:36It's this tall, but it's something that replaces this tall with its actual height and things like
- 35:42that.
- 35:42Correct.
- 35:42Crazy.
- 35:43But fundamentally, you're working with unstructured data and it's kind of messy and it's not always
- 35:47going to work the way you want.
- 35:48And there's a lot of challenges and people are trying lots of different things to make it better.
- 35:52That's cool.
- 35:52It's not always deterministic or exactly the same.
- 35:55So that can be tricky as well.
- 35:58This portion of Talk Python To Me is brought to you by Neo4j.
- 36:01Do you know Neo4j?
- 36:03Neo4j is a native graph database.
- 36:06And if the slowest part of your data access patterns involves computing relationships, why
- 36:12not use a database that stores those relationships directly in the database, unlike your typical
- 36:17relational one?
- 36:18A graph database lets you model the data the way it looks in the real world, instead of forcing
- 36:23it into rows and columns.
- 36:25It's time to stop asking a relational database to do more than they were made for and simplify
- 36:30complex data models with graphs.
- 36:32If you haven't used a graph database before, you might be wondering about common use cases.
- 36:37What's it for?
- 36:38Here are just a few.
- 36:40Detecting fraud.
- 36:41Enhancing AI.
- 36:43Managing supply chains.
- 36:44Gaining a 360 degree view of your data.
- 36:47And anywhere else you have highly connected data.
- 36:50To use Neo4j from Python, it's a simple pip install Neo4j.
- 36:56And to help you get started, their docs include a sample web app demonstrating how to use it
- 37:01both from Flask and FastAPI.
- 37:03Find it in their docs or search GitHub for Neo4j movies application quick start.
- 37:09Developers are solving some of the world's biggest problems with graphs.
- 37:12Now it's your turn.
- 37:13Visit talkpython.fm/Neo4j to get started.
- 37:18That's talkpython.fm/Neo4j.
- 37:23Thank you to Neo4j for supporting Talk Python To Me.
- 37:26One of the big parts of at least this embedding stuff you're talking about are vector databases.
- 37:32And they used to be really rare and kind of their own specialized thing.
- 37:36Now they're starting to show up in lots of places.
- 37:38And you shared with us this link of vector DB comparison.
- 37:41I just saw that MongoDB added it.
- 37:43I'm like, I didn't know that had anything to do with that.
- 37:45And I'm probably not going to mess with it.
- 37:47But it's interesting that it's just like finding its way in all these different spaces, you know?
- 37:51It was weird there for a couple of years where people were basically like talking about vector
- 37:54databases like they're their own separate thing.
- 37:56The vector databases are now becoming their own fully fledged, either relational database
- 38:01or a graph database or a search engine, right?
- 38:03Those are kind of the three categories where all, I mean, I guess Redis is its own thing
- 38:07too.
- 38:07But for the most part, those new databases, quote unquote, are now kind of trying to be more
- 38:11fully fledged.
- 38:12And vectors and semantic search is really just one feature.
- 38:16I was just thinking that is, is this thing that you're talking about?
- 38:18Is it a product or is it a feature of a bigger product, right?
- 38:22Correct.
- 38:22If you already got a database, it's already doing a bunch of things.
- 38:25Could it just answer the vector question?
- 38:26Maybe, maybe not.
- 38:27I don't know.
- 38:28Exactly right.
- 38:28And the one thing to recognize is that, and then the other thing people do is they just
- 38:32take NumPy or what have you and just load them all into memory.
- 38:34And if you don't have that much data, that's actually probably going to be the fastest and
- 38:38simplest way to work.
- 38:39But the thing you got to recognize is the fact that there is precision and recall and
- 38:44cost trade-off that happens as well.
- 38:47So they have to index these vectors and there's different algorithms that are used and different
- 38:53algorithms do better than others.
- 38:54So you got to make sure you understand that as well.
- 38:56So, and one thing you can do is, for instance, pgvector, which comes as an extension for Postgres,
- 39:02you can start off by not indexing at all.
- 39:04And you should get, I believe, hopefully I'm not misspeaking, you should get perfect recall,
- 39:08meaning you'll get the right answer.
- 39:10You'll get the, if you ask for the five closest vectors to the, to your query, you'll get the
- 39:15five closest, but it'll be slower than you probably want.
- 39:17So then you have to index it.
- 39:18And then what ends up happening is, you know, the next time you might only get four of those
- 39:22five, you'll get something else that snuck into that list.
- 39:24If you got time, you're willing to spend unlimited time, then you can get the right answer.
- 39:29The exact answer.
- 39:31But I guess that's all sorts of heuristics, right?
- 39:33You're like, I could, I could spend three days or I could do a Monte Carlo thing and
- 39:37I can give you an answer in a fraction of a second.
- 39:39Right.
- 39:39But it's not, it's not deterministic.
- 39:41All right.
- 39:42So then we'll walk with my camera.
- 39:43So I turn it off.
- 39:44I don't know what's up with it, but we'll, yeah.
- 39:46So you wrote a cool blog post called, what is a custom GPT?
- 39:51And we'll want to talk some about building custom GPTs and with SAPI and so on.
- 39:56So let's talk about this.
- 39:57Like one of the, I think one of the challenges in why it takes so much compute for these systems
- 40:02is like they're open-ended.
- 40:03They're like, you can ask me any question about any knowledge in the world, in the humankind,
- 40:08right?
- 40:08You can, you can ask about that.
- 40:10Let's, let's start talking.
- 40:11Or it could be, you can ask me about genetics.
- 40:14Right.
- 40:15Right.
- 40:15That seems like you could both get better answers if you actually only care about genetic
- 40:19responses.
- 40:20You know, how tall is the landing tower and probably make it smaller.
- 40:24Right.
- 40:25So that's, is that kind of the idea of these custom GPTs or what is it?
- 40:28No.
- 40:28So custom GPTs are new capability from OpenAI.
- 40:32And basically they are a wrapper around a very small subset, but it's still using the open
- 40:38AI ecosystem.
- 40:39Okay.
- 40:39And so what you do is you give it a name, you give it a logo, you give it a prompt.
- 40:43And then from there, you can also give it knowledge.
- 40:47You can upload PDF documents to it and it will actually slice and dice those PDF documents
- 40:51using some sort of vector search.
- 40:53We don't know how it actually works.
- 40:54The GPT, the cool thing is the GPT will work on your phone, right?
- 40:57So I have my phone.
- 40:58I can have a conversation with my phone.
- 40:59I can, I can take a picture, upload a picture and it will do vision, vision analysis on it.
- 41:03So I get all the capabilities of OpenAI GPT-4, but a custom GPT is one that I can
- 41:09construct and give a custom prompt to, which basically then says, okay, now you're into your
- 41:13point.
- 41:14I think maybe this is where you're going with it.
- 41:15Like, Hey, now you're an expert in genomics or you're an expert in something and you're
- 41:18basically coaching the language model and what it can and can't do.
- 41:22And so it's a targeted experience within the large language within the ChatGPT, you know,
- 41:29ecosystem.
- 41:30It has access to also the OpenAI tools.
- 41:32Like, so opening AI has the ability to do code interpreter and Dolly, and it can also hit
- 41:36the web browser.
- 41:37So you have access to everything.
- 41:39But the interesting thing to me is the fact that you can actually tie this thing to what
- 41:43are called actions.
- 41:43So March, I think of last year, they actually had this capability called plugins that they
- 41:48announced and plugins have kind of faded to the background.
- 41:51I don't know if they're going to deprecate them officially, but the basic gist with plugins
- 41:55is what was you could turn that on.
- 41:56It can then call your API.
- 41:57And the cool thing about it was that it read your open API spec, right?
- 42:01So you, you know, you write an open API spec, which is Swagger, if you're familiar with Swagger,
- 42:05and it basically defines what all the endpoints are, what the path is, what the inputs and outputs
- 42:10are, including classes or field level information and any constraints or what have you.
- 42:15So you can define, fully define your open API spec.
- 42:18It can then call that open API spec.
- 42:20And it's basically giving it tools.
- 42:22So like the example that they say in the documentation is get the weather, right?
- 42:25So if you say, what's the weather in Boston?
- 42:26Well, ChatGPT doesn't know the weather in Boston.
- 42:29All it knows how to do is call it, but you can call an API and figures out how to call the
- 42:33API, get that information, and then it can use that to redisplay.
- 42:36And that's a very basic example.
- 42:38You can do way more complicated things than that.
- 42:41It's pretty powerful.
- 42:41Okay.
- 42:42That sounds really pretty awesome.
- 42:44I thought a lot about different things that I might build.
- 42:46On your blog post here, you've got some key benefits and you've got some risks.
- 42:50You maybe want to talk a bit about that?
- 42:52Yeah.
- 42:53So the first part with plugins that didn't work as well is that there was no kind of overarching
- 42:58custom instruction that could actually teach it how to work with your plugin.
- 43:01So if you couldn't put it in the API spec, then you couldn't integrate it with a bunch of
- 43:05other stuff or other capabilities, right?
- 43:08So the custom instruction is really a key thing for making these custom APIs strong.
- 43:12But one warning about the custom instruction, whatever you put in there, anybody can download,
- 43:16right?
- 43:17Not just the folks at OpenAI, anybody.
- 43:18Like basically there's GitHub projects where like thousands of these custom prompts that
- 43:23people have put into their GPT.
- 43:25So, and there are now knockoffs on GPT.
- 43:28So it's all kind of a mess right now in the OpenAI store.
- 43:31I'm sure they'll clean it up, but just recognize the custom instruction is not protected and neither
- 43:35is the knowledge.
- 43:36So if you upload a PDF, there have been people that have been figuring out how to like download
- 43:40those PDFs.
- 43:41And I think that that might be a solved problem now or they're working on it, but something
- 43:45to know.
- 43:46The other problem with plugins was I can get a plugin working, but if they didn't approve
- 43:50my plugin and put it in their plugin store, I couldn't share it with other people.
- 43:55The way it works now is I can actually make a GPT and I can give it to you and you can use
- 44:00it directly, even if it's not in the OpenAI store or OpenAI store.
- 44:03You know, it is super easy to get started.
- 44:05They have like a tool to like help you generate your dolly picture and actually you don't
- 44:09even have to figure out how to do the custom instructions yourself.
- 44:11You can just kind of chat that into existence.
- 44:13But the thing that I'm really excited about is that this is like free playing.
- 44:17Like you could do, so the hosting cost is basically all on the client side.
- 44:22You have to be a ChatGPT plus user right now to create these and use these.
- 44:26But the cool thing as a developer, I don't have to pay those API fees that we were talking
- 44:30about, right?
- 44:30And if I need to use GPT for, which I kind of do for my business right now, just because
- 44:35of how complicated it is, I don't have to pay those token fees for folks using my custom
- 44:40GPT at this moment.
- 44:41Where's like the billing or whatever you call it for the custom GPT live?
- 44:45Is that in the person who's using it?
- 44:47Does it have to, it goes onto their account and whatever their account can do or afford?
- 44:50Yeah, right now, OpenAI, ChatGPT plus is $20 a month.
- 44:55And then there's a Teams version, which I think is either 25 or 30, depending on the number
- 45:00of users or how you pay for it.
- 45:01That's the cost.
- 45:02So right now, if you want to use custom GPTs, everyone needs to be a ChatGPT plus user.
- 45:07There's no extra cost based on usage or anything like that.
- 45:11In fact, there's talk about revenue sharing between OpenAI and developers of custom GPTs.
- 45:17But that has not come out yet as far as like what those details are.
- 45:20It does have an app store feel to it, doesn't it?
- 45:23There's risks too, right?
- 45:24Obviously, anybody can, there's already been like tons of copies up there.
- 45:28OpenAI, they're looking for their business model too, right?
- 45:30So they could, if someone has a very successful custom GPT, it's well within their right to
- 45:35kind of add that to the base product as well.
- 45:37Injection is still a thing.
- 45:39So if you're doing anything in your actions that actually changes something that is consequential
- 45:44is what they call it.
- 45:45You better think very carefully, like what's the worst thing that could happen, right?
- 45:49Because whatever the worst thing that could happen is, that's what's going to happen.
- 45:52Because people can figure this stuff out and they can confuse the large language models into calling them.
- 45:58And the more valuable it is that they can make that thing happen, the more effort they're going to put into it as well.
- 46:03Yeah.
- 46:03Yeah, yeah.
- 46:04For sure.
- 46:05I just ask, is you think it's easy to solve SQL injection and other forms of injection, at least in principle, right?
- 46:13There's an education problem.
- 46:15There's millions of people coming along as developers and they see some demo that says the query is like this plus the name.
- 46:22Wait a minute, wait a minute.
- 46:24So it kind of recreates itself through not total awareness.
- 46:28But there is a very clear thing you do solve that.
- 46:32You use parameters.
- 46:32You don't concatenate strings with user input.
- 46:34Problem solved.
- 46:35What about prompt injection, though?
- 46:36It's so vague how these AIs know what to do in the first place.
- 46:42And so then how do you completely block that off?
- 46:45Unsolved problem.
- 46:46I'm definitely stealing from Simon on this because I've heard him say it on a few podcasts.
- 46:49It's just basically there's no solution as far as we know.
- 46:53So you have to design and there's no solution to the hallucination problem either because that's, you know, that's a feature, right?
- 46:59That's actually what the thing is supposed to do.
- 47:01So when you're building these systems, you have to recognize those those two facts along with some other facts that really limit what you can build with these things.
- 47:09So you shouldn't use it for like legal briefs.
- 47:11Is that what you're saying?
- 47:11I think these things are great collaborative tools, right?
- 47:15Yeah.
- 47:15The human in the loop.
- 47:16And that's everything that I'm building, right?
- 47:17So all the stuff that I'm building is assuming that the humans in the loop and that the and what I'm trying to do is augment and amplify expertise, right?
- 47:25I'm building tools for people that know about genomics and cancer and how to help cancer patients.
- 47:30I'm not designing it for cancer patients who are going to go operate on themselves, right?
- 47:34That's not that's not the goal.
- 47:36The idea is there's a lot of information.
- 47:38There's these tools are super valuable from like synthesizing a variety of info.
- 47:44But you still need to look at the underlying citations and ChatGPT by itself can't give you citations like it'll make some up.
- 47:51It'll say, oh, I think there's probably a Wikipedia page with this link.
- 47:54But you actually have to you definitely have to have an outside tool either the web, you know, being which is I would say subpar for a lot of use cases.
- 48:02Or you have to have actions that can actually bring back references and give you those links.
- 48:07And then the expert will then say, oh, OK, great.
- 48:08Thanks for synthesizing this, giving me this info.
- 48:11Let me go validate this myself, right?
- 48:13Go click on the link and and go validate it.
- 48:15And that's really I think that's really the sweet spot for these things, at least for the near future.
- 48:19Yeah.
- 48:19Don't ask it for the answer.
- 48:20Ask it to help you come up with the answer.
- 48:23Right.
- 48:23Exactly right.
- 48:24All right.
- 48:24And then have you criticize you when you do have something because then it'll do a great job of telling you everything you've done wrong.
- 48:29I'm feeling too good about myself.
- 48:31I need you to insult me a lot.
- 48:32Let's get going.
- 48:33All right.
- 48:34Speaking to talk about ourselves, you've got this project called PyPI GPT.
- 48:38What's this about?
- 48:39I really wanted to tell people that FastAPI and Pydantic because Python, like we were saying earlier, I don't know if it was on the call or not.
- 48:46But Python is the winning language.
- 48:48Right.
- 48:48And I think FastAPI and Pydantic are the winning libraries in their respective fields.
- 48:53And they're great.
- 48:53And they're perfect for this space because you need an open API spec.
- 48:57English is the new programming language.
- 48:59Right.
- 48:59So Andre Caparthe, who used to work at Tesla and now works at OpenAI, has this pinned tweet where he's basically like, English is like the hottest programming language or something like that.
- 49:08And that's really the truth.
- 49:09Because even in this space where I'm building an open API spec, 99% of the work is like thinking about the description of the endpoints or the description of the fields or codifying the constraints on different fields.
- 49:23Like you can use these greater thans and less thans and regexes, right, to describe it.
- 49:27And so what I did was I said, okay, let's build this thing in FastAPI.
- 49:31It's just to get an example out for folks.
- 49:33And then I turned it on.
- 49:35I actually use ngrok as my service layer because you have to have HTTPS to make this thing work.
- 49:40Ngrok is so good.
- 49:41Yep.
- 49:41Yeah.
- 49:42I turned that on with an Nginx thing in front of it.
- 49:44So this library, to actually use it, you'll have to actually set that stuff up yourself.
- 49:49You have to download it.
- 49:50You have to run it.
- 49:50You have to get, you know, either get it on a server with HTTPS with Let's Encrypt or something.
- 49:55Once you've turned it on, then you can actually see how it generates the OpenAPI spec, how to configure the GPT.
- 50:01You know, I didn't do much work with regards to like the custom instructions that I came up with.
- 50:05I just said, hey, call my API, figure it out.
- 50:07And it does.
- 50:08And so what this GPT does is it basically says, OK, given a package name and a version number, it's going to go and grab this data from the SQLite database that I found that has this information and then bring it back to you.
- 50:17It's the least interesting GPT I could come up with, I guess.
- 50:19But it shows kind of the mechanics, right?
- 50:21The mechanics of setting up the servers and the application within FastAPI, the kind of the little, you know, things, the little bits that you have to flip to make sure that OpenAPIs or OpenAI can understand your OpenAPI spec,
- 50:36bumble through OpenAI and OpenAPI all the time, and make sure that they can talk to each other.
- 50:40And then it will then do the right thing and call your server and bring the answers back.
- 50:45And there's, you know, there's a bunch of little flags and information you need to know about actions that are, you know, on the OpenAPI documentation.
- 50:53And so I tried to try to pull that all together into, you know, one simple little project for people to look at.
- 50:58It's cool.
- 50:58So you can ask it questions like, tell me about FastAPI, this version, and it'll come back.
- 51:03I was hoping to do something a little better, like, hey, here's my requirements file and go, you know, tell me, like, am I on the latest version of everything or whatever, like something more interesting.
- 51:12I just didn't have time.
- 51:13Can you ask it questions such as what's the difference between this version and that version?
- 51:17You could, if that information is in the database, I actually don't know if it is.
- 51:20And then obviously you could also hit the PyPI server.
- 51:23And I didn't do that.
- 51:24I just wanted to, I don't want to be, you know, hitting anybody's server indiscriminately at this point.
- 51:29But the, but that would be a great use case, right?
- 51:32So like someone could take this and certainly add some, add some capabilities.
- 51:36The thing that is valuable that I'm trying to showcase is the fact that ChatGPT and large language models, while they do have the world's information kind of compressed, you know, at a point in time, they are still not a database, right?
- 51:49They don't do well when you're basically trying to make sure you have a comprehensive query and you've brought back all the information.
- 51:55And they're also not good from like a up-to-date perspective, right?
- 51:58There's a cutoff date.
- 51:59Thankfully, they finally updated that recently.
- 52:01I think it's now April of 2023.
- 52:03But at some point, it just doesn't know about newer things.
- 52:06And so a GPT is a really interesting way of doing that.
- 52:09I'm going to put it out in the universe and hopefully someone will do it.
- 52:11Make me a modern Python GPT, which is basically like get the new version of Pydantic and Polars and a few other libraries that ChatGPT does a bad job at just because they, you know, they're in under active development during the time that ChatGPT was getting trained.
- 52:26So that's the perfect use case for these types of, you know, custom GPTs with knowledge in a PDF file or an API backing it up.
- 52:35I think there's a ton of value in being able to feed a little bit of your information, some of your documents or your code repository or something to a GPT and then be able to ask it questions about it, right?
- 52:47Yeah.
- 52:47Yeah.
- 52:47Like, you know, tell me about the security vulnerabilities that you see in the code.
- 52:51Like, is there anywhere where I'm, I'm missing some test or I'm calling a function in a way that's known to be bad.
- 52:58And, you know, like that kind of stuff is really tricky, but it's also tricky because it doesn't, even if you paste in a little bit of code, it's not the whole project.
- 53:06Right.
- 53:07So, you know, to put a little bit more in there, it's pretty awesome.
- 53:10Yeah.
- 53:10Being able to give it all the code from some of these code repositories, right.
- 53:14Like, and bringing back the relevant information.
- 53:16So I think there is a kind of this race.
- 53:18There's going to be other, you know, cool, there's another cool project called Sourcegraph and Codi that we can talk about that will, you know, run on your local server and basically indexes your code base and will bring back relevant snippets from your code base and answer questions kind of in context.
- 53:33And, you know, long-term and then the new project around new Codeium, they had a new paper where they talked about flow engineering and flow engineering is just basically that I, that same concept of the human in the loop with the LLM with the code.
- 53:47That's the magic combination of kind of those people, those entities kind of iterating with each other.
- 53:52I think these, you know, these tools are definitely going to evolve and you really want to, you really want to have the ability to have access to your specific information to answer your specific questions.
- 54:02Codi is new to me.
- 54:03Codi.dev and it's a little subtitle or whatever is Codi as a coding assistant that uses AI, understand your code base, right.
- 54:12It was saying it was about your entire code base, APIs, implementations and idioms.
- 54:16Like that's, it's kind of what I was suggesting, at least for code, right.
- 54:19Yeah. And source graph, those folks really understand code indexing and searching.
- 54:24Like that's what the first product was.
- 54:26They were kind of just teed up ready for this large language model moment.
- 54:28And then they said, oh, let's just put Codi on top of that.
- 54:31So this thing will run, it will understand your code and it will kind of bring things together for you.
- 54:36So these folks do, do podcasts all the time.
- 54:38I'd, I'd reach out to them.
- 54:39Yeah. Interesting. It's, it's quite neat looking.
- 54:41I think I'm going to give it a try.
- 54:42It both plugs into a charm and VS Code.
- 54:45That's pretty neat.
- 54:46Very cool.
- 54:46We're starting to get a little bit short on time here, but for people who want to play with the PyPI GPT, maybe as an example, to just cut the readme and it's easy to get from there.
- 54:55What do you need to tell them?
- 54:56I put a make file in there.
- 54:57So, you know, exactly like the steps to kind of make the environment, download the files and just ping, ping me, follow me on Twitter.
- 55:03I'm more and ping me if you need anything there.
- 55:06I'm also on LinkedIn and, and get up.
- 55:08Right.
- 55:08So you can certainly reach out if you, if you have any challenges.
- 55:11Excellent.
- 55:12The last thing that folks that are actually in the medical space, right?
- 55:15So the thing that I'm working on right now actively is how to integrate this thing with our knowledge base.
- 55:21Right.
- 55:21So I have a knowledge base of hand curated trials and curated therapies and other information built it so that my custom GPT can actually work with that.
- 55:30Come up with some, I'd say novel.
- 55:32At least I haven't seen anybody else and I haven't seen any research approaching things the same way I am that handles some of the other challenges that are out there.
- 55:40Right.
- 55:40So for instance, the context window is a challenge.
- 55:43So the context window is the amount of text that's in there and, and how, and how it gets processed.
- 55:48If you're making decisions and you're changing course, the chat bot will lose track of, of those changes.
- 55:56Right.
- 55:56So if you're, you know, experimenting or, or going down one path of inquiry and then you switch to another path, it can get confused and forget that you switch paths.
- 56:05Or just run out of space to hold all that information.
- 56:08Like, well.
- 56:08For sure.
- 56:08It forgot the last three things, the first three things you told it.
- 56:11It only knows four and you think it knows seven and it's working incomplete.
- 56:14Right.
- 56:15Yep.
- 56:15And, and, you know, one of the key things is you actually want it to forget some things as well.
- 56:20Right.
- 56:20So those are, that's, those are all interesting challenges.
- 56:22And I'm actually working with these custom GPTs to kind of change the way that the collaboration works between the human, the expert, the large language model or the assistant and my backend, my actual, the retrieval model.
- 56:37The, the API that's actually doing stuff.
- 56:39So are researchers and MDs and PhDs at your company talking with this thing and making use of it?
- 56:46Yeah.
- 56:46I mean, we're in active development right now.
- 56:47We have a few key opinion leaders that are, that are working with us and collaborating with us, but we're always looking for more folks that, that are in the field that actually.
- 56:55And right now you need kind of the cutting edge people.
- 56:58This stuff's not ready for prime time.
- 56:59Clinical decision support is a really hard problem.
- 57:02And we, but we need the folks that are, that want to get ahead of it because, because we know that there are doctors and there are patients that are asking ChatGPT questions right now.
- 57:11And even if it says I'm not a medical expert, blah, blah, blah.
- 57:13And at the end of the day, we actually don't have enough doctors, right?
- 57:16That's the other scary thing is we don't have enough doctors.
- 57:19Patients want answers.
- 57:20How do we build solutions that can allow this expertise to get more democratized and more, you know, more into folks' hands?
- 57:27And, and I'm hoping, hoping our tool along with these large language models can help, help relieve some of that burden.
- 57:33It might not be as a hundred percent accurate, a hundred percent precise, but neither are doctors, right?
- 57:38They get stuff wrong.
- 57:39You just need to be in the realm of as good as a doctor.
- 57:43You don't need to be, you know, completely without making a mistake.
- 57:47And that's a, I think a challenge that we're just going to have to get used to in general.
- 57:52I joked about the legal brief thing because someone got in trouble for submitting a brief that had hallucinations in it.
- 57:59And there's certain circumstances where maybe it's just not acceptable, but AI, self-driven cars, people crash, but that's a, like a human mistake.
- 58:07But when a machine makes it, it's a pre-programmed, pre-determined mistake.
- 58:12You know, something like that, like it doesn't feel the same as if the machine made a mistake.
- 58:15So if a machine makes a recommendation, like you need this cancer treatment or you're fine, you don't need it.
- 58:21And it was wrong.
- 58:22People are not going to be as forgiving, but it doesn't mean there's not value to be gained from systems that can help you.
- 58:29Right.
- 58:29I always appreciate those, those machine learning papers that I'll like, you know, there'll be show the tracking of over time of like how the models have gotten better and better.
- 58:36And they put the human in there and you can see that the human has already gotten eclipsed by the, by the models.
- 58:41And that specific problem, right?
- 58:42Because it's not also recognizing that a lot of this stuff, these models that are doing tasks are doing one specific task.
- 58:48They're not doing a whole job.
- 58:49They're not, they're not doing an end to end process.
- 58:51They're answering a medical question or they're, you know, looking at an image and finding all the cats or whatever it's supposed to do.
- 58:57So, and to your point though, you know, humans aren't perfect at these tasks either.
- 59:02I think mostly people are going to be using this kind of stuff to help them come up with these answers.
- 59:06Right.
- 59:06The, my weird Amazon description example is going to be the edge case, not the go-to like.
- 59:12Agreed.
- 59:12Yeah.
- 59:13You came in, you spoke to the chat bot.
- 59:15Here's your diagnosis.
- 59:16Have a good day.
- 59:16Right.
- 59:17Not so much more like, I need some help thinking through this.
- 59:20What are some of historic, what are some studies that have like addressed this?
- 59:24Right.
- 59:24And like those kinds of questions.
- 59:25And I hesitate to say it's just a better search engine because that's, I actually think it's got way more potential than that.
- 59:30I agree.
- 59:31It's a conversation.
- 59:32It can iterate back and forth.
- 59:34And what I'm actually trying to do is build some state into it.
- 59:37Right.
- 59:37Some, some structured way of kind of remembering what the conversation was and using a lot of the techniques that these large language models are good at to actually, to make that actually happen.
- 59:47And so that you can actually build a system so that the human and the assistant and the backend all kind of know what the other party is thinking about and that they all work together.
- 59:56Nice.
- 59:57For your genomics custom GPT thing that you're making internally, is that going to become a product eventually?
- 1:00:03If other people are interested, is there some way they can keep tabs on it or is it just internal only?
- 1:00:08Definitely reach out to me.
- 1:00:09So we're building different versions of GPTs.
- 1:00:11Like we're going to have a GPT for our curation team that curates knowledge and we're building a GPT that, you know, my hope is that it'll go to physicians, to oncologists and genomic counselors and other providers that could actually use this thing.
- 1:00:23Eventually, if it becomes robust enough and stable enough, and I don't feel like we're doing a disservice, we could certainly make a version of that available for cancer patients as well.
- 1:00:32I would, you know, I'd love to have that.
- 1:00:34I just want to make sure that it's done in a responsible way.
- 1:00:36Yeah, absolutely.
- 1:00:37Well, I honestly hope that you actually do such a good job that we don't have to have cancer research anymore, but that's a long, long term goal, right?
- 1:00:46That is definitely the end goal.
- 1:00:48And that's really exciting too.
- 1:00:49So is that the new drugs that are coming out, new treatments that are coming out, it's really just about making sure people are aware of it, making sure that they're getting the genetic testing that they need, right?
- 1:00:59So if you have a loved one that has, unfortunately has cancer, make sure that they're at least asking their doctor the question about genomic testing to make sure that they're getting the best possible treatment.
- 1:01:08Sounds good.
- 1:01:09All right.
- 1:01:09Well, quickly, before we get out of here, recommendation on some libraries, some project that maybe we haven't talked about yet.
- 1:01:16Something came across, people were like, oh, this would be awesome.
- 1:01:18We ran out of time.
- 1:01:19I was going to talk about some of these Pydantic projects.
- 1:01:21So there's Marvin, Instructor, and Outlines.
- 1:01:24So folks should definitely look at those.
- 1:01:27So basically what you do is you can describe stuff as Pydantic, and then it'll actually just extract it right into that Pydantic model for you.
- 1:01:34And that's some Marvin and Outlines and Instructor.
- 1:01:36So check those guys out.
- 1:01:37They're awesome.
- 1:01:38And then the other one that I actually had teed up was VisiCalc.
- 1:01:41So VisiCalc is like this crazy command line tool.
- 1:01:45It's awesome.
- 1:01:45You can basically look at giant CSV files all on the command line.
- 1:01:49It has these hotkeys that you can do.
- 1:01:51And it's, sorry, not VisiCalc, VisiData.
- 1:01:54VisiData, okay.
- 1:01:54And so basically it's just, it's basically Excel inside your terminal.
- 1:01:58And this was before Rich and Textual Project.
- 1:02:02And it was just like, it was kind of mind-blowing all the stuff that this person was able to figure out how to make work.
- 1:02:07That's super amazing.
- 1:02:07I just wanted to give a shout out one more thing because your VisiData reminded me of something I just came across called BTOP.
- 1:02:14I don't know if you have servers out there and they need to know what's going on with their server.
- 1:02:18Where's mine?
- 1:02:19I need a picture for this.
- 1:02:20But yeah, it's like a nice visualization.
- 1:02:23There's also B-HITOP.
- 1:02:26It's pretty amazing what people can do in the terminal, right?
- 1:02:28Oh, there they are.
- 1:02:29They're just responsive design themselves out.
- 1:02:31But yeah, if you want a bunch of live graphs.
- 1:02:33Every time I see stuff like this, the VisiData or this or what textual folks are working on, it's just like, I can't believe they built this, right?
- 1:02:41Like, I'm working at the level of colorama.
- 1:02:43This string is red right here.
- 1:02:45They're like, oh, yeah, we rebuilt it.
- 1:02:47I got an emoji to show up, right?
- 1:02:49I'm excited.
- 1:02:49Yes, exactly.
- 1:02:49Yes.
- 1:02:50A rocket ship is there, not just tech.
- 1:02:53Yeah.
- 1:02:54Pretty excellent.
- 1:02:55All right.
- 1:02:55Well, Ian, thank you for being here.
- 1:02:58And keep up the good work.
- 1:03:00I know so many people are using LLMs, but not that many people are creating LLMs.
- 1:03:05And as developers, you know, we love to create things.
- 1:03:08We already have the tools to do it.
- 1:03:09People can check out your GitHub repo on the PyPI and GPT and use it as a starting place, right?
- 1:03:15Sounds great.
- 1:03:16Yeah.
- 1:03:16And definitely reach out if you have any questions.
- 1:03:19Excellent.
- 1:03:19Well, thanks for coming back on the show.
- 1:03:21See you later.
- 1:03:21Great.
- 1:03:22Good to talk to you.
- 1:03:22Bye-bye.
- 1:03:23Yeah, you bet.
- 1:03:23Bye.
- 1:03:24This has been another episode of Talk Python To Me.
- 1:03:27Thank you to our sponsors.
- 1:03:29Be sure to check out what they're offering.
- 1:03:31It really helps support the show.
- 1:03:32Take some stress out of your life.
- 1:03:34Get notified immediately about errors and performance issues in your web or mobile applications with Sentry.
- 1:03:40Just visit talkpython.fm/sentry and get started for free.
- 1:03:45And be sure to use the promo code TALKPYTHON, all one word.
- 1:03:49It's time to stop asking relational databases to do more than they were made for and simplify complex data models with graphs.
- 1:03:57Check out the sample FastAPI project and see what Neo4j, a native graph database, can do for you.
- 1:04:04Find out more at talkpython.fm/Neo4j.
- 1:04:09Want to level up your Python?
- 1:04:10Want to level up your Python?
- 1:04:10We have one of the largest catalogs of Python video courses over at Talk Python.
- 1:04:14Our content ranges from true beginners to deeply advanced topics like memory and async.
- 1:04:19And best of all, there's not a subscription in sight.
- 1:04:22Check it out for yourself at training.talkpython.fm.
- 1:04:25Be sure to subscribe to the show.
- 1:04:27Open your favorite podcast app and search for Python.
- 1:04:30We should be right at the top.
- 1:04:31You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 1:04:36and the direct RSS feed at /rss on talkpython.fm.
- 1:04:41We're live streaming most of our recordings these days.
- 1:04:43If you want to be part of the show and have your comments featured on the air,
- 1:04:47be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
- 1:04:51This is your host, Michael Kennedy.
- 1:04:53Thanks so much for listening.
- 1:04:55I really appreciate it.
- 1:04:56Now get out there and write some Python code.
- 1:04:58I'll see you next time.