From the course: LLMOps in Practice: A Deep Dive

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Adding logging to your server

Adding logging to your server - Python Tutorial

From the course: LLMOps in Practice: A Deep Dive

Adding logging to your server

So we now have a working chat app. But what we wanted to do in this exercise is start thinking about logging user activity in the chat app, so that we can start understanding how our users are interacting with our app, and then help us on our first steps towards doing LLMOps and build a better app. So what we're going to look at now is that exercise that you were given. And I'll show you how to implement the logging that we were talking about. Okay. First of all, we want to include the ability to create a unique identity for our users. And for that, we're going to use a couple of libraries called fs and crypto. So I'm going to start with const fs = require('fs'), like so. And then const crypto = require('crypto'). Don't worry we're not doing blockchain or anything like that, we're just using those libraries to give us some unique identifiers. So we now have the inputs that we need in order to be able to continue. Now all of the other code that we've been doing, OpenAI stuff, Express…

Contents