OpenAI Compatibility & Training Logs Collection
Tromero’s API seamlessly integrates with OpenAI's API, making it easy to try out open-source models on existing applications. It allows you to collect and store valuable training logs, enabling you to harness the power of these logs to train your own AI models. Moreover, our platform automatically generates synthetic versions of these logs, providing you with a comprehensive and diverse dataset.
Key Features
- Full Compatibility with OpenAI: Tromero’s API endpoints for chat, language and code, images, and embeddings are fully compatible with OpenAI's API.
- Two-Line Integration: The Python or Node wrapper collects all interactions seamlessly once set up in the user’s code.
- Synthetic Versions: Each interaction is saved along with all metadata, creating a synthetic version of that interaction.
- Tagging: Users can add tags to logs directly from the wrapper, which will be reflected in the table of collected logs.
Prerequisites
Before you begin, ensure you have the following:
- An account on Tromero
- A stored credit card on file
- Access to OpenAI’s API
- Basic knowledge of Python or JavaScript
Make sure to obtain your API key from your Tromero Tailor dashboard before proceeding.
Installation
To install Tromero Tailor, you can use pip for Python, and npm for Node.js:
pip install tromero_tailor
Getting Started
Importing the Package
For Python, import the TailorAI
class from the tromero_tailor
package.
For Node.js, import the Tromero
class from the tromero
package:
from tromero_tailor import TailorAI
Initializing the Client
Initialize the TailorAI
/Tromero
client using your API keys, which should be stored securely and preferably as environment variables:
import os
client = TailorAI(api_key=os.getenv("OPENAI_KEY"), tromero_key=os.getenv("TROMERO_KEY"))
Usage
This class is a drop-in replacement for OpenAI, so you should be able to use it as you did before. For example:
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "user", "content": prompt},
],
)
And for your trained model:
response = client.chat.completions.create(
model="your-model-name",
messages=[
{"role": "user", "content": prompt},
],
)
If you need further assistance, please contact support@tromero.ai and we would be happy to help!