solana-agent 1.1.0__py3-none-any.whl → 1.1.2__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 CHANGED
@@ -336,7 +336,6 @@ class AI:
336
336
  use_perplexity: bool = True,
337
337
  use_grok: bool = True,
338
338
  use_facts: bool = True,
339
- use_kb=True,
340
339
  perplexity_model: Literal[
341
340
  "sonar", "sonar-pro", "sonar-reasoning-pro", "sonar-reasoning"
342
341
  ] = "sonar",
@@ -375,21 +374,27 @@ class AI:
375
374
  """
376
375
  try:
377
376
  if use_facts:
378
- facts = self.search_facts(user_id, query)
377
+ try:
378
+ facts = self.search_facts(user_id, query)
379
+ except Exception:
380
+ facts = ""
379
381
  else:
380
382
  facts = ""
381
383
  if use_perplexity:
382
- search_results = self.search_internet(query, perplexity_model)
384
+ try:
385
+ search_results = self.search_internet(
386
+ query, perplexity_model)
387
+ except Exception:
388
+ search_results = ""
383
389
  else:
384
390
  search_results = ""
385
391
  if use_grok:
386
- x_search_results = self.search_x(query, grok_model)
392
+ try:
393
+ x_search_results = self.search_x(query, grok_model)
394
+ except Exception:
395
+ x_search_results = ""
387
396
  else:
388
397
  x_search_results = ""
389
- if use_kb:
390
- kb_results = self.search_kb(query)
391
- else:
392
- kb_results = ""
393
398
 
394
399
  response = self._client.chat.completions.create(
395
400
  model=openai_model,
@@ -400,7 +405,7 @@ class AI:
400
405
  },
401
406
  {
402
407
  "role": "user",
403
- "content": f"Query: {query}, Facts: {facts}, KB Results: {kb_results}, Internet Search Results: {search_results}, X Search Results: {x_search_results}",
408
+ "content": f"Query: {query}, Facts: {facts}, Internet Search Results: {search_results}, X Search Results: {x_search_results}",
404
409
  },
405
410
  ],
406
411
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: Build self-learning AI Agents
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents
@@ -0,0 +1,6 @@
1
+ solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
2
+ solana_agent/ai.py,sha256=mM-oCkrUFO8Lp0dZoqWOlOU0f9lAKmjeuc3eFRWy9zo,29995
3
+ solana_agent-1.1.2.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
4
+ solana_agent-1.1.2.dist-info/METADATA,sha256=YNglp_2p5pn02MJjtzqAJUTjo_RyiKtp-zIZklJM3c0,4276
5
+ solana_agent-1.1.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
6
+ solana_agent-1.1.2.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
2
- solana_agent/ai.py,sha256=PC-kg_F5lG7t89nglQGzhM3kV-Yw3MI-qYyRUMly8oA,29851
3
- solana_agent-1.1.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
4
- solana_agent-1.1.0.dist-info/METADATA,sha256=tRJ6N48mY3mE8Zyvl2DzOEQQoAGG2pfiYWTTAbUOnoA,4276
5
- solana_agent-1.1.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
6
- solana_agent-1.1.0.dist-info/RECORD,,