Skip to main content
Below are details of the Freeplay data model, which can be helpful to understand for more advanced usage. Note the parameter names are written in snake case but some SDK languages make use of camel case instead

Record Payload

from freeplay import RecordPayload
Parameter NameData TypeDescriptionRequired
project_idstrFreeplay’s projectIdY
all_messagesList[dict[str, str]]All messages in the conversation so farY
inputsdictThe input variablesN
session_infoSessionInfoThe session id for which the recording should be associatedN
call_infoCallInfoInformation associated with the LLM callN
response_infoResponseInfoInformation associated with the LLM responseN
test_run_infoTestRunInfoInformation associated with the Test Run if this recording is part of a Test RunN

Call Info

from freeplay import CallInfo
Parameter NameData TypeDescriptionRequired
providerstringThe name of your LLM providerY
modelstringThe name of your modelY
start_timefloatThe start time of the LLM call. This will be used to measure latencyY
end_timefloatThe end time of the LLM call. This will be used to measure latencyY
model_parametersLLMParametersThe parameters associated with your LLM callY
usage{ “prompt_tokens”: int, “completion_tokens”: int }An optional token count to record to Freeplay for cost calculation. If this value is not included, Freeplay will estimate token counts using Tiktoken.N

Response Info

from freeplay import ResponseInfo
Parameter NameData TypeDescriptionRequired
is_completebooleanIndicates the reason for stoping the LLM generationY
function_call_responseOpenAIFunctionCallThe results of a function callN

LLM Parameters

from freeplay.llm_parameters import LLMParameters
Parameter NameData TypeDescriptionRequired
membersDict[str, any]Any parameters associated with your LLM call that you want recordedY

Test Run Info

from freeplay import TestRunInfo
Parameter NameData TypeDescriptionRequired
test_run_idstringThe id of your Test RunY
test_case_idstringThe id of your Test CaseY

OpenAI Function Call

from freeplay.completions import OpenAIFunctionCall
Parameter NameData TypeDescriptionRequired
namestringThe name of the invoked function callY
argumentsstringThe arguments for the invoked function callY