freeplay 0.3.0a4__tar.gz → 0.3.0a5__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.0a4
3
+ Version: 0.3.0a5
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.0-alpha.4"
3
+ version = "0.3.0-alpha.5"
4
4
  description = ""
5
5
  authors = ["FreePlay Engineering <engineering@freeplay.ai>"]
6
6
  license = "MIT"
File without changes
@@ -1,3 +1,4 @@
1
+ import copy
1
2
  import json
2
3
  from abc import ABC, abstractmethod
3
4
  from dataclasses import dataclass
@@ -73,7 +74,8 @@ class BoundPrompt:
73
74
  messages: List[Dict[str, str]]
74
75
  ) -> List[Dict[str, str]]:
75
76
  if flavor_name == 'azure_openai_chat' or flavor_name == 'openai_chat':
76
- return messages
77
+ # We need a deepcopy here to avoid referential equality with the llm_prompt
78
+ return copy.deepcopy(messages)
77
79
  elif flavor_name == 'anthropic_chat':
78
80
  messages_without_system = [message for message in messages if message['role'] != 'system']
79
81
  return messages_without_system
File without changes
File without changes