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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Build self-learning AI Agents
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "2.0.0"
3
+ version = "2.0.1"
4
4
  description = "Build self-learning AI Agents"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -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
- self._instructions = instructions
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": f"Query: {user_text}, Memory: {memory}",
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": f"Query: {transcript}, Memory: {memory}",
944
+ "content": transcript,
935
945
  },
936
946
  ],
937
947
  tools=self._tools,
File without changes
File without changes