PUT
/
events
import honeyhive
from honeyhive.models import operations

s = honeyhive.HoneyHive(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.events.update_event(request=operations.UpdateEventRequestBody(
    event_id='7f22137a-6911-4ed3-bc36-110f1dde6b66',
    metadata={
        'cost': 0.00008,
        'completion_tokens': 23,
        'prompt_tokens': 35,
        'total_tokens': 58,
    },
    feedback={
        'rating': 5,
    },
    metrics={
        'num_words': 2,
    },
    outputs={
        'role': 'assistant',
        'content': 'Hello world',
    },
    config={
        'template': [
            {
                'role': 'system',
                'content': 'Hello, {{ name }}!',
            },
        ],
    },
    user_properties={
        'user_id': '691b1f94-d38c-4e92-b051-5e03fee9ff86',
    },
    duration=42,
))

if res is not None:
    # handle response
    pass

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
event_id
string
required
metadata
object
feedback
object
metrics
object
outputs
object

Response

200

Event updated