Phylosophy, Technology

Private GenAI chat with Librechat.ai - Part 2

This is second part of the series of articles about building your own private ChatGPT like web-chat with Librechat.ai. Introduction post is here.

In this post I describe how to set up secure access to LLM (Large Language Models) in Amazon Bedrock.

You will learn how to:

  • Create a new user with only necessary permissions. This user to be used by your Librechat.ai installation to access LLMs in Amazon Bedrock.
  • Generate access keys for the user.
  • Open access to LLMs of your choice in the Amazon Bedrock service.

Read More…

Private GenAI chat with Librechat.ai - Intro

This article is the first part of the series of articles about building your own private ChatGPT like web-chat with Librechat.ai.

Motivation

Why would you need your own ChatGPT? Well, there are several reasons for that:

1. Privacy

By my opinion, this is the most important reason. You don’t want to share your data with third-party services. “What data?”, one may ask. Well, your chat logs, documents, images and any other data you might share with the chat.

Read More…

Selecting AWS SSO profile for a terminal session with FZF

In this post I want to share with you my simple script which I use to select AWS SSO profile for a terminal session. As a developer of IaC for AWS, I have to switch between different AWS accounts and roles. In most cases customers use AWS Access portal (used to be known as SSO portal) for authentication and authorization. To quickly switch roles in the terminal I developed a simple script and aliases for shell to perform those operations quickly.

Read More…

AWS IAM Role Assumtion Pecularity

Hi all. I am staring to write a series of posts about AWS. This article is the first one in the series. The goal is not to provide a deep dive into the AWS services, but to share some interesting and useful tips about AWS, which I have learned on my projects.

Today I will outline an interesting peculiarity of AWS IAM role assumption. I think it is important to understand for building better permission and trust policies for your IAM roles. I identified this interesting behavior while working on a project where I needed to restrict which roles can assume a particular role inside the same account.

Read More…

MPV Player Control Scripts

I use Xmonad tiling window manager and MPV is my main player for music, videos, and Internet streams. Tiling window managers are great for hotkeys lovers, and I am one of them. I have a lot of key bindings which allow me to launch applications, make screenshots, control window positions, use so called scratchpads (special workspaces for often used applications).

And some time ago I decided to build a set of scripts which would allow me to control MPV player from the keyboard. I wanted to be able to play/pause, stop, seek, open folers, files and internet radio, etc. Another feature of my scripts is presentation of the current track information into the status bar. I use Xmobar, but you can use any status bar you like.

Read More…

My personal example of using math in programming

I was working on a small personal tool which adjusts the brightness via DDC protocol.

BTW, you can check the Github repository of it.

I wanted the tool which adjusts brightness automatically and gradually, using the time of the day and the season information. The first version which has been created perfectly fit my needs and had been working on my PCs for over 2 years.

Then I decided to share it with public and I started to work on its improvement. My goal was to generalize and parameterize the tool as much as possible, so that it could be used by other people with different requirements. And during this optimization I faced a problem with the brightness adjustment algorithm. Its initial implementation was rigid, built with if-else statements. I struggled with this problem for a while, looking for a fancy built-in Python modules or operators. Until I realized that what I need, is just to make a function. No, not the Python function, but the mathematical function!

Let’s go, I will show you how I did it.

Read More…

My Linux Experience Update

I have been using Linux as my primary operating system for more than 5 years now. The best part is that last 3.5 years I am using Linux not only at home, but also at work. My company allows to use Ubuntu Linux as a primary OS on my work laptop.

In this small post I like to reflex on my experience with Linux and how it has changed my life.

Read More…

Writing my own password generator

There are many password generators available: online and offline, as independent applications or as part of password managers. But I decided to write my own password generator in Python. Why?

  • It is a fun and small Python project, which can be done in one evening.
  • It will do only what I need and nothing else.
  • I know how it works and I can trust it.
  • I can use my own dictionary of words and phrases to generate passwords.

So, let’s go!

If you don’t want to read the whole article, you can go directly to the GitHub repository.

Read More…

Status Update

I have been off my blog for a while now. In year 2021 I started a new job at AWS and I have been busy with that. My time was occupied with learning new things and working on new projects.

Read More…