Last Update: August 14, 2024

Getting Started with Tromero

Get up to speed with our API in one minute.

Tromero is designed to streamline the process of fine-tuning and deploying AI models. This step-by-step tutorial will guide users through getting started with Tromero, enabling users to transition from using OpenAI’s API to a self-hosted, privacy-preserving model in just a few simple steps! By transitioning to a self-hosted model, Tromero ensures user's data remains private and secure, complying with data protection regulations and safeguarding sensitive information.

1. Register for an account

First, a user must register for an account to get an API key.

Once a user has registered, they can set their account's API key to an environment variable named TROMERO_API_KEY:

export TROMERO_API_KEY=xxxxx

2. Install the user's preferred library

First, users need to install Tromero's Python or TypeScript library.

pip install tromero

Importing the Package

When installed users need to import Tromero.

from tromero import Tromero

Initializing the Client

The user can initialize the Tromero client using their API keys, which should be stored securely and preferably as environment variables. To create an API key, please visit the settings page.

import os
client = Tromero(tromero_key=os.getenv("TROMERO_KEY"))

3. Run the first query against a model

Users can choose a model to query. In this example, we'll use Meta Llama 3.1 70B instruct model.

With their selected model, users can use their preferred library to query one of Tromero’s APIs – for example, to run a chat completion:


response = client.chat.completions.create(
    model="llama-3.1-70b-instruct",
    messages: [
      { role: 'system', content: 'You are a friendly chatbot.' },
      { role: 'user', content: 'What should I see while in Paris?' },
    ]
)

print(response.choices[0].message.content)

Next Steps

  • Users can go to the Logs & Datasets page to create a dataset.
  • Users can go to the Fine-tune page to view their models.
  • Users can their newly trained model on the Deploy page.
  • Users can evaluate their model's performance on the Evaluate page.
  • Users can interact with their models in the Playground.

Resources

For further assistance, please contact support@tromero.ai and we would be happy to help!

Was this page helpful?