Send conversation with interaction traces
curl --request POST \
--url https://backend.nebuly.com/event-ingestion/api/v2/events/trace_conversation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"interactions": [
{
"input": "<string>",
"output": "<string>",
"time_start": "<string>",
"time_end": "<string>",
"tags": {},
"feedback_actions": [
{}
],
"trace": [
{
"model": "<string>",
"messages": [
{}
],
"output": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"source": "<string>",
"input": "<string>",
"outputs": [
"<string>"
]
}
]
}
],
"end_user": "<string>"
}
}
'Send conversation with interaction traces
POST
/
event-ingestion
/
api
/
v2
/
events
/
trace_conversation
Send conversation with interaction traces
curl --request POST \
--url https://backend.nebuly.com/event-ingestion/api/v2/events/trace_conversation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"interactions": [
{
"input": "<string>",
"output": "<string>",
"time_start": "<string>",
"time_end": "<string>",
"tags": {},
"feedback_actions": [
{}
],
"trace": [
{
"model": "<string>",
"messages": [
{}
],
"output": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"source": "<string>",
"input": "<string>",
"outputs": [
"<string>"
]
}
]
}
],
"end_user": "<string>"
}
}
'You can use this endpoint to send the full conversation between the user and the AI system. This approach allows to send interactions (with their traces) in a single request. This endpoint is designed for sending data asynchronously in bulk once conversations are completed.
The conversation an user is having with an LLM based assistant.
Show conversation properties
Show conversation properties
The interaction to send to the nebuly platform.
Show properties
Show properties
The user input in the interaction.
The LLM output in the interaction (the text shown to the user as assistant response).
The start time of the call to the LLM. You can approximate this to the time when the user sends the interaction. The accepted format is the
ISO 8601.Example: 2023-12-07T15:00:00.000ZThe end time of the call to the LLM. This is when the user receives the full answer from the model. The accepted format is the
ISO 8601.Example: 2023-12-07T15:00:00.000ZTag 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.A list of feedback actions provided by the end-user during or after the interaction.Each object in the array can contain:
slug: (string) – the type of action. Accepted values include:thumbs_upthumbs_downcopy_inputcopy_outputpastecommentregenerateeditrating
text: (string, optional) – textual feedback associated with the action (if applicable).value: (number, optional) – only used for theratingaction to capture a numerical score.
"feedback_actions": [
{
"slug": "thumbs_up",
"text": "Very helpful response!"
},
{
"slug": "comment",
"text": "Can you explain more about this?"
},
{
"slug": "rating",
"value": 4,
"text": "Pretty good!"
},
{
"slug": "regenerate"
}
]
The full trace of your LLM agent or chain. There are two kind of steps that can compose a trace:
- LLMTrace
- RetrievalTrace
- EmbeddingTrace
The intermediate call to an LLM.
Show properties
Show properties
The LLM used.
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.
"messages": [
{
"role": "system",
"content: "This is a system prompt"
},
{
"role": "user",
"content": "user input 1"
},
{
"role": "assistant",
"content": "assistant response 1"
},
{
"role": "user",
"content": "user input"
}
]
The LLM output message.
The number of input tokens.
The number of output tokens.
The intermediate call to a retriever tool (vector db) or agent tool (function calling).
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.
⌘I