solana-agent 15.1.2__py3-none-any.whl → 15.1.3__py3-none-any.whl

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.
@@ -103,11 +103,6 @@ class OpenAIAdapter(LLMProvider):
103
103
  print(traceback.format_exc())
104
104
  yield f"I apologize, but I encountered an error transcribing the audio: {str(e)}"
105
105
 
106
- finally:
107
- # Close file if we opened it
108
- if isinstance(audio_file, (str, Path)):
109
- audio_file.close()
110
-
111
106
  async def generate_text(
112
107
  self,
113
108
  prompt: str,
@@ -57,7 +57,12 @@ class MongoDBAdapter(DataStorageProvider):
57
57
 
58
58
  def delete_one(self, collection: str, query: Dict) -> bool:
59
59
  result = self.db[collection].delete_one(query)
60
- return result.deleted_count > 0
60
+ return result.deleted_count == 1
61
+
62
+ def delete_all(self, collection: str, query: Dict) -> bool:
63
+ total_documents = self.db[collection].count_documents(query)
64
+ deleted_result = self.db[collection].delete_many(query)
65
+ return deleted_result.deleted_count == total_documents
61
66
 
62
67
  def count_documents(self, collection: str, query: Dict) -> int:
63
68
  return self.db[collection].count_documents(query)
@@ -42,6 +42,11 @@ class DataStorageProvider(ABC):
42
42
  """Delete a document."""
43
43
  pass
44
44
 
45
+ @abstractmethod
46
+ def delete_all(self, collection: str, query: Dict) -> bool:
47
+ """Delete all documents matching query."""
48
+ pass
49
+
45
50
  @abstractmethod
46
51
  def create_index(self, collection: str, keys: List, **kwargs) -> None:
47
52
  """Create an index."""
@@ -4,7 +4,7 @@ from zep_cloud.client import AsyncZep as AsyncZepCloud
4
4
  from zep_python.client import AsyncZep
5
5
  from zep_cloud.types import Message
6
6
  from solana_agent.interfaces.providers.memory import MemoryProvider
7
- from solana_agent.interfaces.providers.data_storage import DataStorageProvider
7
+ from solana_agent.adapters.mongodb_adapter import MongoDBAdapter
8
8
 
9
9
 
10
10
  class MemoryRepository(MemoryProvider):
@@ -12,7 +12,7 @@ class MemoryRepository(MemoryProvider):
12
12
 
13
13
  def __init__(
14
14
  self,
15
- mongo_adapter: DataStorageProvider,
15
+ mongo_adapter: MongoDBAdapter,
16
16
  zep_api_key: Optional[str] = None,
17
17
  zep_base_url: Optional[str] = None
18
18
  ):
@@ -94,7 +94,7 @@ class MemoryRepository(MemoryProvider):
94
94
  async def delete(self, user_id: str) -> None:
95
95
  """Delete memory from both systems."""
96
96
  try:
97
- self.mongo.delete_many(
97
+ self.mongo.delete_all(
98
98
  self.collection,
99
99
  {"user_id": user_id}
100
100
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 15.1.2
3
+ Version: 15.1.3
4
4
  Summary: The Future of Work
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents,agi
@@ -1,7 +1,7 @@
1
1
  solana_agent/__init__.py,sha256=ceYeUpjIitpln8YK1r0JVJU8mzG6cRPYu-HLny3d-Tw,887
2
2
  solana_agent/adapters/__init__.py,sha256=tiEEuuy0NF3ngc_tGEcRTt71zVI58v3dYY9RvMrF2Cg,204
3
- solana_agent/adapters/llm_adapter.py,sha256=1ypfIwPlngExQWYdm5MIsWePWxkfw_Jq8KVXvr4v1Vg,6294
4
- solana_agent/adapters/mongodb_adapter.py,sha256=zvcIZ61zx45cwfjMimXC2RV_D_s6sL5b2Dz6H3HCgFc,2456
3
+ solana_agent/adapters/llm_adapter.py,sha256=msW-MAWV5JuU-fg7fP5h8PJ1aEGNVntHXvKos2Iu6O8,6148
4
+ solana_agent/adapters/mongodb_adapter.py,sha256=qqEFbY_v1XGyFXBmwd5HSXSSHnA9wWo-Hm1vGEyIG0k,2718
5
5
  solana_agent/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  solana_agent/client/solana_agent.py,sha256=Q_8sNOXwCe0yd_QBLkv0L-G9Kh5pPnH5pZtRLxVUR6s,3957
7
7
  solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv46U,168
@@ -12,7 +12,7 @@ solana_agent/factories/agent_factory.py,sha256=7krNpsAHnle-IFjKqYz4aJgfvlj7yMRhf
12
12
  solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
13
13
  solana_agent/interfaces/client/client.py,sha256=g5wJez2_q7Ak0db8GYhzBuDoqXfiTVI3El741pjY9AU,1147
14
14
  solana_agent/interfaces/plugins/plugins.py,sha256=TMmTXwHhmkdJpIhgADfrpGGGk7PHP7O9Qi89uA26uMI,3013
15
- solana_agent/interfaces/providers/data_storage.py,sha256=Qjui9ISvX_NtOUPTUyjPMNxDoYRpml-aMG8DZy_Qxzc,1509
15
+ solana_agent/interfaces/providers/data_storage.py,sha256=NqGeFvAzhz9rr-liLPRNCGjooB2EIhe-EVsMmX__b0M,1658
16
16
  solana_agent/interfaces/providers/llm.py,sha256=skCRAThH5QRIIiEqkp5Wo4PnmJkCIsSzEFGTY54mjY0,1580
17
17
  solana_agent/interfaces/providers/memory.py,sha256=oNOH8WZXVW8assDigIWZAWiwkxbpDiKupxA2RB6tQvQ,1010
18
18
  solana_agent/interfaces/repositories/agent.py,sha256=r2MzVYOpEBVN00yqRxr3bUgWUgSwqoI1hRrdHhgFpFU,819
@@ -26,12 +26,12 @@ solana_agent/plugins/tools/__init__.py,sha256=c0z7ij42gs94_VJrcn4Y8gUlTxMhsFNY6a
26
26
  solana_agent/plugins/tools/auto_tool.py,sha256=Z3CcOzwdXpzciH-5yphhd9qt1b9owTxhwC-dYmPF6B0,1489
27
27
  solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
28
28
  solana_agent/repositories/agent.py,sha256=e1rnsQiigkKwJNLKro86a3b6TBiky3GMfmCRc5b_jPw,3187
29
- solana_agent/repositories/memory.py,sha256=0wgoa2bXhpgdBgn9-i9G10PB1bMGYObxcoY9Newll40,4742
29
+ solana_agent/repositories/memory.py,sha256=GABGwaz00thjviHewLvb18NeKE8dkBROxy_stsiiWrE,4722
30
30
  solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
31
31
  solana_agent/services/agent.py,sha256=DYomQ5y6Y_rSIZuXjS15qOP0x4pa0El6woFaNu3mUPw,13963
32
32
  solana_agent/services/query.py,sha256=MB1CYgsM7Mns0LtdO-K1_LqUX-XaTY1j9eGgbGZwWmg,10534
33
33
  solana_agent/services/routing.py,sha256=TPJ2Pas4acE93QzMEV6ZP670OtTNrVEPa76fz6urEV4,4996
34
- solana_agent-15.1.2.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
35
- solana_agent-15.1.2.dist-info/METADATA,sha256=cBGGFFzA22d5X0w1uA7F2eBQqsJVCMgx8hPJOvU78lo,4956
36
- solana_agent-15.1.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
37
- solana_agent-15.1.2.dist-info/RECORD,,
34
+ solana_agent-15.1.3.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
35
+ solana_agent-15.1.3.dist-info/METADATA,sha256=cKUixsoH8v8wr-Fs43ErKrwcDxFKKTem-0HWYvR54MM,4956
36
+ solana_agent-15.1.3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
37
+ solana_agent-15.1.3.dist-info/RECORD,,