New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@kithinji/ldf

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kithinji/ldf

Create LLM datasets in a simple intuitive format

latest
Source
npmnpm
Version
1.0.32
Version published
Maintainers
1
Created
Source

Transform LDF (lugha dataset format) to jsonl

Create LLM datasets in a simple intuitive format

Instruction

npm i -g @kithinji/ldf

Write the config file (ldf.json)

{
    "src": "src",
    "dist": "dist",
    "shards": [
        "lugha_dataset",
        "text-to-sql.ldf"
    ],
    "config": {
        "tool": "to_assistant",
        "reasoning": "hide"
    }
}

How your files can be structured

|---- dist
|---- src
|       |----lugha_dataset
|       |    |----arrays.ldf
|       |    |----functions.ldf
|       |----text-to-sql.ldf
|---- ldf.json

The configuration file helps ldf parse your dataset.

  • src: The home directory
  • dist: Where to write the data.jsonl file
  • shards: Where your data files are located
    • You can import folders and the tool will read all files ending with .ldf extension
    • You can also import individual files

Example of a conversation

conversation {
    user {
        content {
p { "What can you do for me?" }
        }
    }

    assistant {
        content {
            reason {
p {
"Let me think. The user is asking what I can do for them."
"I have various tools in my arsenal that can help the user automate some tasks."
}
            }

            answer {
p { "I can read and reply your emails." }
            }
        }
    }
}

To compile the dataset run

ldf ldf.json

LDF will then convert that to JSONL format

{"messages":[{ "role": "user", "content": "p { \"What can you do for me\""}"}, { "role": "assistant", "content": "reason { p { \"Let me think...\" } } answer { p { \"I can read and reply your emails\" } }"}]}

FAQs

Package last updated on 14 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts