Last Update: August 14, 2024

Uploading Data to Tromero

To have specialised and well performing Large Language Model (LLM) deployments within an enterprise, it is crucial to collect and upload data on interactions between end-users and LLMs. This page provides guidance on how to upload data to Tromero using Tromero's Python or TypeScript libraries, as well as through the platform's drag-and-drop interface. In this section we'll cover the requirements for installing the necessary libraries, configuring data collection, and uploading data files directly.

Upload through Tromero's Python and TypeScript libraries

When collecting data through Tromero's Python or TypeScript library users will need to first install the library.

pip install tromero

Users can then record all transactions betweeen end-users and the LLM by passing save_data_default = True:

import os
from tromero import Tromero

client = Tromero(tromero_key=os.getenv("TROMERO_KEY"), save_data_default=True)

If a user wishes to override the save_data_default just for certain models or transactions, they can pass a save_data = True or saveData = true parameter to the completions function:

response = client.chat.completions.create(
    model = "your-model-name",
    messages = [
        {"role": "system", "content": "You are a friendly chatbot." },
        {"role": "user", "content": prompt},
    ],
    save_data = True,
    )

Entire data files can also be uploaded through the Python library or the CLI.

client.data.upload('{file_path}', ['tag1', 'tag2'])

Upload through Tromero's Drag-and-Drop UI

Data can also be uploaded directly from the platform. Users can drag and drop their JSON/JSONL files into the upload area. The system will validate the format and allow the user to upload the logs.

Logs and Datasets

Was this page helpful?