solana-agent 2.0.0__tar.gz → 2.0.1__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.
- {solana_agent-2.0.0 → solana_agent-2.0.1}/PKG-INFO +1 -1
- {solana_agent-2.0.0 → solana_agent-2.0.1}/pyproject.toml +1 -1
- {solana_agent-2.0.0 → solana_agent-2.0.1}/solana_agent/ai.py +15 -5
- {solana_agent-2.0.0 → solana_agent-2.0.1}/LICENSE +0 -0
- {solana_agent-2.0.0 → solana_agent-2.0.1}/README.md +0 -0
- {solana_agent-2.0.0 → solana_agent-2.0.1}/solana_agent/__init__.py +0 -0
|
@@ -101,7 +101,16 @@ class AI:
|
|
|
101
101
|
"""
|
|
102
102
|
self._client = OpenAI(api_key=openai_api_key, base_url=openai_base_url) if openai_base_url else OpenAI(
|
|
103
103
|
api_key=openai_api_key)
|
|
104
|
-
|
|
104
|
+
memory_instructions = """
|
|
105
|
+
You are a highly intelligent, context-aware conversational AI. When a user sends a query or statement, you should not only process the current input but also retrieve and integrate relevant context from their previous interactions. Use the memory data to:
|
|
106
|
+
- Infer nuances in the user's intent.
|
|
107
|
+
- Recall previous topics, preferences, or facts that might be relevant.
|
|
108
|
+
- Provide a thoughtful, clear, and structured response.
|
|
109
|
+
- Clarify ambiguous queries by relating them to known user history.
|
|
110
|
+
|
|
111
|
+
Always be concise and ensure that your response maintains coherence across the conversation while respecting the user's context and previous data.
|
|
112
|
+
"""
|
|
113
|
+
self._instructions = instructions + " " + memory_instructions
|
|
105
114
|
self._database: MongoDatabase = database
|
|
106
115
|
self._accumulated_value_queue = asyncio.Queue()
|
|
107
116
|
self._zep = AsyncZep(api_key=zep_api_key) if zep_api_key else None
|
|
@@ -766,11 +775,12 @@ class AI:
|
|
|
766
775
|
messages=[
|
|
767
776
|
{
|
|
768
777
|
"role": "system",
|
|
769
|
-
"content": self._instructions,
|
|
778
|
+
"content": self._instructions + f" Memory: {memory}",
|
|
779
|
+
|
|
770
780
|
},
|
|
771
781
|
{
|
|
772
782
|
"role": "user",
|
|
773
|
-
"content":
|
|
783
|
+
"content": user_text,
|
|
774
784
|
},
|
|
775
785
|
],
|
|
776
786
|
tools=self._tools,
|
|
@@ -927,11 +937,11 @@ class AI:
|
|
|
927
937
|
messages=[
|
|
928
938
|
{
|
|
929
939
|
"role": "system",
|
|
930
|
-
"content": self._instructions,
|
|
940
|
+
"content": self._instructions + f" Memory: {memory}",
|
|
931
941
|
},
|
|
932
942
|
{
|
|
933
943
|
"role": "user",
|
|
934
|
-
"content":
|
|
944
|
+
"content": transcript,
|
|
935
945
|
},
|
|
936
946
|
],
|
|
937
947
|
tools=self._tools,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|