solana-agent 4.0.1__py3-none-any.whl → 4.0.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.
- solana_agent/ai.py +28 -0
- {solana_agent-4.0.1.dist-info → solana_agent-4.0.3.dist-info}/METADATA +1 -1
- solana_agent-4.0.3.dist-info/RECORD +6 -0
- solana_agent-4.0.1.dist-info/RECORD +0 -6
- {solana_agent-4.0.1.dist-info → solana_agent-4.0.3.dist-info}/LICENSE +0 -0
- {solana_agent-4.0.1.dist-info → solana_agent-4.0.3.dist-info}/WHEEL +0 -0
solana_agent/ai.py
CHANGED
|
@@ -763,6 +763,10 @@ class AI:
|
|
|
763
763
|
"role": "system",
|
|
764
764
|
"content": f"Rules: {self._reasoning_instructions}, Tool Result: {result}, Memory Context: {memory}",
|
|
765
765
|
},
|
|
766
|
+
{
|
|
767
|
+
"role": "user",
|
|
768
|
+
"content": user_text,
|
|
769
|
+
},
|
|
766
770
|
],
|
|
767
771
|
stream=True,
|
|
768
772
|
)
|
|
@@ -833,6 +837,16 @@ class AI:
|
|
|
833
837
|
}
|
|
834
838
|
self._database.save_message(user_id, metadata)
|
|
835
839
|
|
|
840
|
+
if self._zep:
|
|
841
|
+
messages = [
|
|
842
|
+
Message(
|
|
843
|
+
role="assistant",
|
|
844
|
+
role_type="assistant",
|
|
845
|
+
content=final_response,
|
|
846
|
+
),
|
|
847
|
+
]
|
|
848
|
+
await self._zep.memory.add(session_id=user_id, messages=messages)
|
|
849
|
+
|
|
836
850
|
async def conversation(
|
|
837
851
|
self,
|
|
838
852
|
user_id: str,
|
|
@@ -947,6 +961,10 @@ class AI:
|
|
|
947
961
|
"role": "system",
|
|
948
962
|
"content": f"Rules: {self._reasoning_instructions}, Tool Result: {result}, Memory Context: {memory}",
|
|
949
963
|
},
|
|
964
|
+
{
|
|
965
|
+
"role": "user",
|
|
966
|
+
"content": transcript,
|
|
967
|
+
},
|
|
950
968
|
],
|
|
951
969
|
stream=True,
|
|
952
970
|
)
|
|
@@ -1017,6 +1035,16 @@ class AI:
|
|
|
1017
1035
|
}
|
|
1018
1036
|
self._database.save_message(user_id, metadata)
|
|
1019
1037
|
|
|
1038
|
+
if self._zep:
|
|
1039
|
+
messages = [
|
|
1040
|
+
Message(
|
|
1041
|
+
role="assistant",
|
|
1042
|
+
role_type="assistant",
|
|
1043
|
+
content=final_response,
|
|
1044
|
+
),
|
|
1045
|
+
]
|
|
1046
|
+
await self._zep.memory.add(session_id=user_id, messages=messages)
|
|
1047
|
+
|
|
1020
1048
|
# Generate and stream the audio response
|
|
1021
1049
|
with self._client.audio.speech.with_streaming_response.create(
|
|
1022
1050
|
model="tts-1",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
|
|
2
|
+
solana_agent/ai.py,sha256=t1BJtTZ7RHzUL_5DNCrJHBGxV6xWk2-x5fhsO0pM6p8,44136
|
|
3
|
+
solana_agent-4.0.3.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
|
4
|
+
solana_agent-4.0.3.dist-info/METADATA,sha256=rguDaFGlywlBNdYHLjWjJzER1fXFrTis0lFPNXIIu7I,4808
|
|
5
|
+
solana_agent-4.0.3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
6
|
+
solana_agent-4.0.3.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
|
|
2
|
-
solana_agent/ai.py,sha256=qPq0krnOZ8GxdbvVvHVIcOJZ11l9T0_QXGZz8mSw8tQ,43095
|
|
3
|
-
solana_agent-4.0.1.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
|
4
|
-
solana_agent-4.0.1.dist-info/METADATA,sha256=iowE2ubQJkvob61Frvp-m__ZdxYySrNiPRxwQElVFXo,4808
|
|
5
|
-
solana_agent-4.0.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
6
|
-
solana_agent-4.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|