1.0.32 • Published 7 months ago

@kithinji/ldf v1.0.32

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

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\" } }"}]}
1.0.32

7 months ago

1.0.31

7 months ago

1.0.30

7 months ago

1.0.29

7 months ago

1.0.28

7 months ago

1.0.27

7 months ago

1.0.26

7 months ago

1.0.25

7 months ago

1.0.24

7 months ago

1.0.23

7 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.20

7 months ago

1.0.19

7 months ago

1.0.18

7 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.12

7 months ago

1.0.11

7 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago