naas-abi-core 1.7.0__py3-none-any.whl → 1.7.1__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.
@@ -182,8 +182,9 @@ class AgentSharedState:
182
182
  def set_requesting_help(self, requesting_help: bool):
183
183
  self._requesting_help = requesting_help
184
184
 
185
+
185
186
  class ABIAgentState(MessagesState):
186
- system_prompt: str = Field(default="")
187
+ system_prompt: str
187
188
 
188
189
 
189
190
  @dataclass
@@ -227,7 +228,11 @@ class AgentConfiguration:
227
228
  )
228
229
 
229
230
  def get_system_prompt(self, messages: list[AnyMessage]) -> str:
230
- return self.system_prompt(messages) if callable(self.system_prompt) else self.system_prompt
231
+ return (
232
+ self.system_prompt(messages)
233
+ if callable(self.system_prompt)
234
+ else self.system_prompt
235
+ )
231
236
 
232
237
 
233
238
  class CompletionQuery(BaseModel):
@@ -867,12 +872,18 @@ AGENT SYSTEM PROMPT:
867
872
  from datetime import datetime
868
873
 
869
874
  current_date_str = f"CURRENT_DATE: The current date is {datetime.now().strftime('%Y-%m-%d')}\n"
870
- #self._system_prompt = self._system_prompt + "\n" + current_date_str
875
+ # self._system_prompt = self._system_prompt + "\n" + current_date_str
871
876
  updated_system_prompt = updated_system_prompt + "\n" + current_date_str
872
- return Command(goto="current_active_agent", update={"system_prompt": updated_system_prompt})
877
+ return Command(
878
+ goto="current_active_agent",
879
+ update={"system_prompt": updated_system_prompt},
880
+ )
873
881
 
874
882
  # logger.debug(f"💬 System prompt: {self._system_prompt}")
875
- return Command(goto="continue_conversation", update={"system_prompt": updated_system_prompt})
883
+ return Command(
884
+ goto="continue_conversation",
885
+ update={"system_prompt": updated_system_prompt},
886
+ )
876
887
 
877
888
  def continue_conversation(self, state: ABIAgentState) -> Command:
878
889
  return Command(goto="call_model")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naas-abi-core
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Abi framework allowing you to build your AI system.
5
5
  Project-URL: Homepage, https://github.com/jupyter-naas/abi
6
6
  Project-URL: Repository, https://github.com/jupyter-naas/abi/tree/main/libs/naas-abi-core
@@ -44,7 +44,7 @@ naas_abi_core/modules/templatablesparqlquery/workflows/TemplatableSparqlQueryLoa
44
44
  naas_abi_core/pipeline/__init__.py,sha256=4de6BzXJI6nTSI7baeqe4IoN-Q95idsADchU6Eiv55Q,309
45
45
  naas_abi_core/pipeline/pipeline.py,sha256=m1QWXwdy_0yr8hxILNwoPSK2-vIz4P9WeZ6pDm9gJSg,2186
46
46
  naas_abi_core/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- naas_abi_core/services/agent/Agent.py,sha256=h3797FYzXc1vV-6q0L1B5LriwXRLGbXa4qvnvm78yuQ,64129
47
+ naas_abi_core/services/agent/Agent.py,sha256=786elqXQOUthNHudE1_oZhY-pdd-KsB_vO-_MtwMhWQ,64241
48
48
  naas_abi_core/services/agent/AgentMemory_test.py,sha256=sSqDkr0o0MgeHudsX5s3u2oFLaAX7GVgyQPwdsD76Cs,650
49
49
  naas_abi_core/services/agent/Agent_test.py,sha256=VITdYn0fSK-7dq67qVQbirkwZBIRBwtRqdaWy9E87VY,6343
50
50
  naas_abi_core/services/agent/IntentAgent.py,sha256=KwILHZYFqbVGo0AoEZrSgFk64_Cd1q02SQ_81gVZ6jE,46139
@@ -118,7 +118,7 @@ naas_abi_core/workflow/__init__.py,sha256=hZD58mCB1PApxITqftP_xgjxL7NeLvOfI-rJEN
118
118
  naas_abi_core/workflow/workflow.py,sha256=ZufSS073JztVl0OQRTqNyK7FepFvv7gXlc4j5FAEZCI,1216
119
119
  assets/favicon.ico,sha256=nWk8wrHZiJV3DeuWrP2MqilXxCuoNWKGtMZfYmEVQLw,666
120
120
  assets/logo.png,sha256=zUu9sNgMmtzJhfNCinDs85GP1LDNVfTy8kYLKRT_pxA,9334
121
- naas_abi_core-1.7.0.dist-info/METADATA,sha256=tA_I09koD-mWO_95RhPiPuY4ynK7qEjSkuKNCEQRgzU,17567
122
- naas_abi_core-1.7.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
123
- naas_abi_core-1.7.0.dist-info/entry_points.txt,sha256=IX0WUFxZuo1JU6H66fcRR6y7gYChMVw_XA9suPk9_1Q,70
124
- naas_abi_core-1.7.0.dist-info/RECORD,,
121
+ naas_abi_core-1.7.1.dist-info/METADATA,sha256=j5RbrNzGCk0FtqTrwGo1fcVfpU5nHiZvzjsrgCxOoPc,17567
122
+ naas_abi_core-1.7.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
123
+ naas_abi_core-1.7.1.dist-info/entry_points.txt,sha256=IX0WUFxZuo1JU6H66fcRR6y7gYChMVw_XA9suPk9_1Q,70
124
+ naas_abi_core-1.7.1.dist-info/RECORD,,