freeplay 0.3.11__tar.gz → 0.3.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: freeplay
3
- Version: 0.3.11
3
+ Version: 0.3.12
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: FreePlay Engineering
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "freeplay"
3
- version = "0.3.11"
3
+ version = "0.3.12"
4
4
  description = ""
5
5
  authors = ["FreePlay Engineering <engineering@freeplay.ai>"]
6
6
  license = "MIT"
@@ -2,6 +2,7 @@ import json
2
2
  import logging
3
3
  from dataclasses import dataclass
4
4
  from typing import Any, Dict, List, Optional, Union
5
+ from uuid import UUID
5
6
 
6
7
  from requests import HTTPError
7
8
 
@@ -64,6 +65,7 @@ class RecordPayload:
64
65
  test_run_info: Optional[TestRunInfo] = None
65
66
  eval_results: Optional[Dict[str, Union[bool, float]]] = None
66
67
  trace_info: Optional[TraceInfo] = None
68
+ completion_id: Optional[UUID] = None
67
69
 
68
70
 
69
71
  @dataclass
@@ -80,7 +82,7 @@ class Recordings:
80
82
  raise FreeplayClientError("Messages list must have at least one message. "
81
83
  "The last message should be the current response.")
82
84
 
83
- record_api_payload = {
85
+ record_api_payload: Dict[str, Any] = {
84
86
  "messages": record_payload.all_messages,
85
87
  "inputs": record_payload.inputs,
86
88
  "tool_schema": record_payload.tool_schema,
@@ -99,6 +101,9 @@ class Recordings:
99
101
  }
100
102
  }
101
103
 
104
+ if record_payload.completion_id is not None:
105
+ record_api_payload['completion_id'] = str(record_payload.completion_id)
106
+
102
107
  if record_payload.session_info.custom_metadata is not None:
103
108
  record_api_payload['custom_metadata'] = record_payload.session_info.custom_metadata
104
109
 
File without changes
File without changes