Getting Started with the Resource API in Angular

Angular 19 will introduce a new reactive API called Resource API. The primary purpose of the Resource API is to load the resources, such as: Fetch data from the API Update data locally Asynchronously load local resource It should not be used for mutation such as POST operations. It should mainly be used to loadContinueContinue reading “Getting Started with the Resource API in Angular”

How to Use Ocelot as an API Gateway in ASP.NET Core

An API gateway is a frontend server for APIs, handling incoming API requests and routing them to the appropriate backend services. It plays a crucial role in microservice architecture by offering a single entry point to the system. Some main functionalities of an API gateway are: Routing Authentication Authorization Request composition Caching Load balancing Fault tolerance ServiceContinueContinue reading “How to Use Ocelot as an API Gateway in ASP.NET Core”

Integrating OpenAI’s GPT with Angular: A Step-by-Step Guide

In this article, we’ll walk through the step-by-step process of integrating the OpenAI GPT model into an Angular application. To get started, create a new Angular project and follow each step as you go along. Please note that you’ll need a valid OpenAI API key to proceed. By default, newer versions of Angular projects doContinueContinue reading “Integrating OpenAI’s GPT with Angular: A Step-by-Step Guide”

GenAI for Beginners:  What is the Top-p sampling in a model

When working with Large Language Models (LLMs), it is essential to understand specific key parameters that influence the model’s behaviour. Two of the most critical parameters are: Temperature Top-P (nucleus) In the last part, we discussed the Temperature parameter. Read here – https://debugmode.net/2025/06/12/genai-for-beginners-what-is-the-temperature-parameter-in-a-model/ Top-p sampling, also called nucleus sampling, is a method used to controlContinueContinue reading “GenAI for Beginners:  What is the Top-p sampling in a model”

GenAI for Beginners:  What is the Temperature parameter in a model

When working with Large Language Models (LLMs), it is essential to understand specific key parameters that influence the model’s behaviour. Two of the most critical parameters are: Temperature Top-P (nucleus) sampling value Temperature is a parameter that controls the randomness in the model’s output by affecting how the model selects the next token to generate.ContinueContinue reading “GenAI for Beginners:  What is the Temperature parameter in a model”

Getting Started with the httpResource API in Angular

Angular 19 introduced the Resource API for fetching data, and it should not be used for mutation operations, such as POST requests. However, an issue arose when working with the Resource API. One major problem was that it wasn’t built on top of HttpClient, which meant that interceptors did not function as expected. To address theContinueContinue reading “Getting Started with the httpResource API in Angular”

What is Type Assertion in TypeScript

In TypeScript, Type Assertions allow developers to explicitly specify the type of a variable to the TypeScript compiler.  When the compiler cannot infer the type of a variable and the developer is more sure about the type, they can use a type assertion. Type assertions are a compile-time construct that does not result in runtimeContinueContinue reading “What is Type Assertion in TypeScript”

What are Discriminated Unions Patterns in TypeScript?

Recently, I came across a pattern named Discriminated Unions Types in TypeScript. In this blog post, let us learn about that. Discriminated Unions are a pattern where each type in the union has a common property. In TypeScript, a union type allows a variable to hold one of several specified types. A straightforward example of aContinueContinue reading “What are Discriminated Unions Patterns in TypeScript?”

What is Narrowing in TypeScript?

To understand narrowing, let’s begin with a problem scenario. Suppose you’re working with a custom type called myType, which is defined as a union of string and null. type mytype = string | null; let a: mytype = “FOO”; console.log(a!.toLowerCase()); // foo The code above should print “foo” in lowercase.   Now, if you setContinueContinue reading “What is Narrowing in TypeScript?”

How to use TypeScript Custom Predicate for Narrowing

In TypeScript, narrowing refers to refining the type of a variable within a specific block of code. It allows TypeScript to infer a more particular type from a broader type based on runtime checks or control flow. Narrowing is used for better type safety, ensuring that only properties or methods on a type can be accessed. ItContinueContinue reading “How to use TypeScript Custom Predicate for Narrowing”