Ruby
In this guide, we will show how to send users’ interactions with an OpenAI model to Nebuly’s platform.
Before getting started, you would need two API keys:
- Your OpenAI key
- Nebuly authentication key
Below you can find a detailed explanation of the parameters:
A list of messages from the conversation so far, following the same format used by OpenAI Chat Completion endpoints.
Each message has two required fields:
role
: the role of who is sending the message. Possible values are: system, user, assistant, tool.content
: the content of the message.
The messages in the list should be ordered according to the conversation’s sequence, from the oldest message to the most recent.
Example:
Output from the LLM model
When the end-user request process started
When the end-user request process ended
An id or username uniquely identifying the end-user. We recommend hashing their username or email address, in order to avoid sending us any identifying information.
The LLM model you are using. Please note that this is needed if you want to visualize the cost of your requests. Now we support costs only for OpenAI models, cost of other providers coming soon.
Tag user interactions by adding key-value pairs using this parameter. Each key represents the tag name, and the corresponding value is the tag value.
For example, if you want to tag an interaction with the model version used to reply to user input, provide it as an argument for nebuly_tags, e.g. {"version" => "v1.0.0"}
. You have the flexibility to define custom tags, making them available as potential filters on the Nebuly platform.
You can find all the API details in the API documentation.