Skip to main content

Create a Session

# create a session
session = fpClient.sessions.create()

Custom Metadata

Freeplay enables you to log Custom Metadata associated with any Session. This is fully customizable and can take any arbitrary key-value pairs. Use Custom Metadata to record things like customer ID, thread ID, RAG version, Git commit SHA, or any other information you want to track.
# create a session with custom metadata
session = fpClient.sessions.create(
  custom_metadata={
    "keyA": "valueA",
    "keyB": false
  }
)

Delete a Session

project_id = 'bf56b063-80dc-4ad5-91f6-f7067ad1fa06'
session_id = session.session_id

fpClient.sessions.delete(project_id, session_id)