Record Payload
| Parameter Name | Data Type | Description | Required |
|---|---|---|---|
| project_id | str | Freeplay’s projectId | Y |
| all_messages | List[dict[str, str]] | All messages in the conversation so far | Y |
| inputs | dict | The input variables | N |
| session_info | SessionInfo | The session id for which the recording should be associated | N |
| call_info | CallInfo | Information associated with the LLM call | N |
| response_info | ResponseInfo | Information associated with the LLM response | N |
| test_run_info | TestRunInfo | Information associated with the Test Run if this recording is part of a Test Run | N |
Call Info
| Parameter Name | Data Type | Description | Required |
|---|---|---|---|
| provider | string | The name of your LLM provider | Y |
| model | string | The name of your model | Y |
| start_time | float | The start time of the LLM call. This will be used to measure latency | Y |
| end_time | float | The end time of the LLM call. This will be used to measure latency | Y |
| model_parameters | LLMParameters | The parameters associated with your LLM call | Y |
| 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
| Parameter Name | Data Type | Description | Required |
|---|---|---|---|
| is_complete | boolean | Indicates the reason for stoping the LLM generation | Y |
| function_call_response | OpenAIFunctionCall | The results of a function call | N |
LLM Parameters
| Parameter Name | Data Type | Description | Required |
|---|---|---|---|
| members | Dict[str, any] | Any parameters associated with your LLM call that you want recorded | Y |
Test Run Info
| Parameter Name | Data Type | Description | Required |
|---|---|---|---|
| test_run_id | string | The id of your Test Run | Y |
| test_case_id | string | The id of your Test Case | Y |
OpenAI Function Call
| Parameter Name | Data Type | Description | Required |
|---|---|---|---|
| name | string | The name of the invoked function call | Y |
| arguments | string | The arguments for the invoked function call | Y |

