How to Generate OpenAI GPT Output in JSON Format Using Python for Legal Text Analysis

JSON output with OpenAI GPT function calls

Generating consistent JSON output is now possible thanks to function calling feature in OpenAI’s gpt-4-0613 and gpt-3.5-turbo-0613 models. Function calling introduces a systematic approach to generating structured data. This capability allows for the precise definition of functions within the models, which then produce outputs in JSON format, as opposed to unstructured text. This development addresses the […]

Solving Docker CLI Installation Issues: A Guide to Handling Missing GPG Keys

balioglunet default blog thumbnail

Introduction If you’ve ever attempted to install Docker CLI and found yourself wrestling with an error that suggests the system can’t verify the Docker package’s source because of a missing GPG key, know that you’re not the only one. This issue is quite common, and it happens when the system lacks the necessary GPG key […]

If using all scalar values you must pass an index

The Problem: When you try to create a pandas dataframe using only scalar values without passing an index, you will get a ValueError: If using all scalar values, you must pass an index. In this article, I will provide an explanation of the problem and three easy and different solutions. First, let’s understand the root […]

🏅 How to Combine Pandas Dataframe Columns Easily

In Python based data analysis projects, it is quite common to combine dataframe columns. Actually, it is super easy to to this. In this blog post, I am going to show you how to combine pandas dataframe columns easily. There are more than one ways to combine multiple pandas dataframe columns. Luckily, the easiest method […]

[Step-by-Step] How to Install TaLib Library on Linux?

How to Install Ta-Lib Library on Linux

TaLib is a high quality technical analysis library, originally written in C language. Thanks to its developers, there is a Python wrapper which allows us to use in Python, too. However, installing it is a bit tricky and requires more steps than simply installing it with pip. In this post, I am going to show […]

Python How To Remove Everything Except Letters & Numbers

Python How To Remove Everything Except Letters And Numbers

Letters and numbers are technically called alphanumeric characters. In this article, I am going to show you how to remove everything except letters and numbers from a string in Python. So you will keep only alphanumeric characters (letters and numbers) and delete everything else. For this, we will use Python regular expression module. It is […]

[6 Lines Of Code] How To Connect Oracle Database In Python

How To Connect Oracle Database In Python

Oracle is generous to give everyone a full cloud database for free. I am frequently using this database because Oracle SQL is really a powerful tool for data analysis. Currently, I create many CSV files, from webscraping, financial data from APIs, etc.. So, a connection between Python and Oracle database is an absolute requirement for […]