ai-parrot 0.2.5__cp311-cp311-manylinux_2_28_x86_64.whl → 0.2.7__cp311-cp311-manylinux_2_28_x86_64.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.

Potentially problematic release.


This version of ai-parrot might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ai-parrot
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Live Chatbots based on Langchain chatbots and Agents Integrated into Navigator Framework or used into aiohttp applications.
5
5
  Home-page: https://github.com/phenobarbital/ai-parrot
6
6
  Author: Jesus Lara
@@ -1,10 +1,10 @@
1
1
  parrot/__init__.py,sha256=eTkAkHeJ5BBDG2fxrXA4M37ODBJoS1DQYpeBAWL2xeI,387
2
2
  parrot/conf.py,sha256=-9bVGC7Rf-6wpIg6-ojvU4S_G1wBLUCVDt46KEGHEhM,4257
3
3
  parrot/exceptions.cpython-311-x86_64-linux-gnu.so,sha256=gDwsnUlOlwphVU97XaqG5e7BJs_PWPKdwgwDsjyVZIg,361200
4
- parrot/manager.py,sha256=cgiF0JS-canOaBVIYIt-zSJRtOQLZqe2eMPQjGonlGc,5939
4
+ parrot/manager.py,sha256=NhzXoWxSgtoWHpmYP8cV2Ujq_SlvCbQYQBaohAeL2TM,5935
5
5
  parrot/models.py,sha256=RsVQCqhSXBKRPcu-BCga9Y1wyvENFXDCuq3_ObIKvAo,13452
6
6
  parrot/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- parrot/version.py,sha256=AaiY69n7AuoPnmB6WjTj2x60dJgRcJAKHS_d_3SO-G0,373
7
+ parrot/version.py,sha256=xEjtbWMHN7Dh_-7dUkLHuz1Ggdxq2bKaW7CrrH6bwY4,373
8
8
  parrot/chatbots/__init__.py,sha256=ypskCnME0xUv6psBEGCEyXCrD0J0ULHSllpVmSxqb4A,200
9
9
  parrot/chatbots/abstract.py,sha256=CmDn3k4r9uKImOZRN4L9zxLbCdC-1MPUAorDlfZT-kA,26421
10
10
  parrot/chatbots/asktroc.py,sha256=gyWzyvpAnmXwXd-3DEKoIJtAxt6NnP5mUZdZbkFky8s,604
@@ -12,12 +12,12 @@ parrot/chatbots/base.py,sha256=cRw7k5FRKOfLdXQJeQvACVE5ZgE1NUWf3IY7OsSsxuo,12912
12
12
  parrot/chatbots/basic.py,sha256=DIMTPoGc90BRSlokeOdnjlEXAAfZlIFqxXWaMyAX9uk,232
13
13
  parrot/chatbots/bose.py,sha256=z8rm8G_tAwHjDUodXfrAKnhaMzufQyf-GrhxwHeHle4,757
14
14
  parrot/chatbots/cody.py,sha256=Z0LNiNtZjEe7bA3hwexclBZK5zEF9m2ODVmrzZjC3Bw,623
15
- parrot/chatbots/copilot.py,sha256=iwwH3qMqmnNwoVvWKyyrfTi46gAIjlkAPI4yqUGGOEA,1756
15
+ parrot/chatbots/copilot.py,sha256=WDDNhjyH-xvOOA831E9qmPpGXGCpFbzO3vKj9zbfudg,2038
16
16
  parrot/chatbots/dataframe.py,sha256=CfZiLKIwnaku52nl2PNjciqRlH8m2lM4buO6xI7P408,3914
17
17
  parrot/chatbots/hragents.py,sha256=PyNIBJ2OH5CtfVydccgpY50V6GI3cLKuVdOMaa7sQz0,574
18
18
  parrot/chatbots/oddie.py,sha256=RMbANmJZP1_vLVGKRNBKmA8otyAiWPkvpA0rJ0U3tZk,796
19
19
  parrot/chatbots/odoo.py,sha256=RMbANmJZP1_vLVGKRNBKmA8otyAiWPkvpA0rJ0U3tZk,796
20
- parrot/chatbots/retrievals/__init__.py,sha256=x04qJFPT_oY4Yx0aC7NmjbhtgBZA7Yw0QUcLfjYvzyQ,19558
20
+ parrot/chatbots/retrievals/__init__.py,sha256=FV3RmHSeMWAG2kJkh5cDM8bR6dT9PzGfv6Y8qyLh3kQ,19590
21
21
  parrot/chatbots/retrievals/constitutional.py,sha256=x7kFR0KpmkR0Wz6bXNOeU3Hesn_EXc6eOSd4TdXxb8o,600
22
22
  parrot/crew/__init__.py,sha256=oWLEWNNdYHB2AZUDUZVlSsdMOJiWamvM-jVZ8SzoWQE,77
23
23
  parrot/crew/tools/__init__.py,sha256=n2nXEVl8VeWmdI_NyGbiVTAq_S51ebNExuyRM7u9SeI,569
@@ -33,7 +33,7 @@ parrot/crew/tools/search.py,sha256=itWpJD_78IXVtBSKrQIAamCPLbejwmUj1oCBKqBxvO0,1
33
33
  parrot/crew/tools/url.py,sha256=m5v9XFQPotHRID7NmY-NQVmXtXEJvfly6tFMslL8U_0,682
34
34
  parrot/handlers/__init__.py,sha256=WKn2yg4pSi5-IivkQ34uHSfTG7f1nYj4jB8-4wNG2_A,64
35
35
  parrot/handlers/bots.py,sha256=GG2W8y_GC71f8_mMHxwAYP-ope7ecNP_GShL9c66_uY,5782
36
- parrot/handlers/chat.py,sha256=iqTChdNqcbhCR2meOqLhPx2XQiSiDzzFP8nRAcPH_7s,5437
36
+ parrot/handlers/chat.py,sha256=3FjE8PhR4_SFny8ZxplWf25i0qKsCBKoOz8widR3pDY,5166
37
37
  parrot/interfaces/__init__.py,sha256=m3FpxsFeEKq_hvQR9YRGAhZS6u8LZZBuzf6-njugiHE,69
38
38
  parrot/interfaces/database.py,sha256=PHy133KTqa9K0tALOQt1q0ufwUZ4n7rndZrhob6Wbk4,609
39
39
  parrot/llms/__init__.py,sha256=bxhPgslU6TjWlOgUFkWV6heavRqmm53PuKNjjZ-Hr1o,3838
@@ -80,7 +80,7 @@ parrot/loaders/utils/__init__.py,sha256=SkDyK3MuPGhp0NM6kHvaxQDe97Gcl3n9t5A741OV
80
80
  parrot/loaders/utils/models.py,sha256=BHcnFzS7oOKUGG-vPy_TlqeFNAC8puRgsIMX2mSgKxY,1059
81
81
  parrot/stores/__init__.py,sha256=ZFjZvcLhcqJqndx9tiEANpyiude1fvjrCxyt2S42VqY,1496
82
82
  parrot/stores/abstract.py,sha256=aqDhkVr5VwdKqg7StroIXf32-11MLyyMAlZuh5hJeCY,5138
83
- parrot/stores/milvus.py,sha256=RKU0GX0Z1r-xocGesKgMNbBgfdO098xISvZOpDfb054,20450
83
+ parrot/stores/milvus.py,sha256=PZPXbr65Rt9LopTCTY53DWrQ11t6yBHYj_C09zf1s4A,20444
84
84
  parrot/stores/qdrant.py,sha256=y-jG5sB6ICESyxdpyGBhQ-hgTDLxxPtM5xYZTWIRiAY,4720
85
85
  parrot/tools/__init__.py,sha256=XKZwogdGr6ObPfAGbzAdyDjFnXI286eapsi180VwdjE,614
86
86
  parrot/tools/abstract.py,sha256=pVSZw8MDpbVcQ-CHaGwP6CpqXHIs8hH8Oy1AqUuMmrw,1706
@@ -103,8 +103,8 @@ resources/users/handlers.py,sha256=BGzqBvPY_OaIF_nONWX4b_B5OyyBrdGuSihIsdlFwjk,2
103
103
  resources/users/models.py,sha256=glk7Emv7QCi6i32xRFDrGc8UwK23_LPg0XUOJoHnwRU,6799
104
104
  settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
105
  settings/settings.py,sha256=9ueEvyLNurUX-AaIeRPV8GKX1c4YjDLbksUAeqEq6Ck,1854
106
- ai_parrot-0.2.5.dist-info/LICENSE,sha256=vRKOoa7onTsLNvSzJtGtMaNhWWh8B3YAT733Tlu6M4o,1070
107
- ai_parrot-0.2.5.dist-info/METADATA,sha256=1plIbp5DK4AE62_7GB87hDDtNGwBccPLdcjEgio_k_8,10421
108
- ai_parrot-0.2.5.dist-info/WHEEL,sha256=tFO7F0mawMNWa_NzTDA1ygqZBeMykVNIr04O5Zxk1TE,113
109
- ai_parrot-0.2.5.dist-info/top_level.txt,sha256=qHoO4BhYDfeTkyKnciZSQtn5FSLN3Q-P5xCTkyvbuxg,26
110
- ai_parrot-0.2.5.dist-info/RECORD,,
106
+ ai_parrot-0.2.7.dist-info/LICENSE,sha256=vRKOoa7onTsLNvSzJtGtMaNhWWh8B3YAT733Tlu6M4o,1070
107
+ ai_parrot-0.2.7.dist-info/METADATA,sha256=3dyKDgSYCgNEXrjvET--EP7GMS261HKNyPOsAYCEl20,10421
108
+ ai_parrot-0.2.7.dist-info/WHEEL,sha256=tFO7F0mawMNWa_NzTDA1ygqZBeMykVNIr04O5Zxk1TE,113
109
+ ai_parrot-0.2.7.dist-info/top_level.txt,sha256=qHoO4BhYDfeTkyKnciZSQtn5FSLN3Q-P5xCTkyvbuxg,26
110
+ ai_parrot-0.2.7.dist-info/RECORD,,
@@ -45,29 +45,38 @@ class CopilotAgent(BaseAgent):
45
45
  @classmethod
46
46
  def default_tools(cls) -> list:
47
47
  # ZipCode API Toolkit
48
- zpt = ZipcodeAPIToolkit()
49
- zpt_tools = zpt.get_tools()
48
+ tools = []
49
+ zpt_tools = []
50
+ try:
51
+ zpt = ZipcodeAPIToolkit()
52
+ zpt_tools = zpt.get_tools()
50
53
 
51
- wk1 = WikipediaTool()
52
- wk12 = WikidataTool()
54
+ except Exception as e:
55
+ print('ERROR LOADING ZIPCODE TOOLS')
53
56
 
54
- g1 = GoogleSearchTool()
55
- g2 = GoogleLocationFinder()
57
+ wk1 = WikipediaTool()
58
+ wk12 = WikidataTool()
56
59
 
57
- b = BingSearchTool()
58
- d = DuckDuckGoSearchTool()
59
- ask = AskNewsTool()
60
+ g1 = GoogleSearchTool()
61
+ g2 = GoogleLocationFinder()
60
62
 
61
- yt = YouTubeSearchTool()
62
- stackexchange = StackExchangeTool()
63
- weather = OpenWeatherMapTool()
63
+ b = BingSearchTool()
64
+ d = DuckDuckGoSearchTool()
65
+ ask = AskNewsTool()
64
66
 
65
- tools = [
66
- wk1,
67
- wk12, g1, g2,
68
- b, d, ask, yt,
69
- weather,
70
- stackexchange
71
- ] + zpt_tools
67
+ yt = YouTubeSearchTool()
68
+ stackexchange = StackExchangeTool()
69
+ weather = OpenWeatherMapTool()
70
+
71
+ tools = [
72
+ wk1,
73
+ wk12, g1, g2,
74
+ b, d, ask, yt,
75
+ weather,
76
+ stackexchange
77
+ ] + zpt_tools
78
+
79
+ except Exception as e:
80
+ print('TOOL Error > ', e)
72
81
 
73
82
  return tools
@@ -84,26 +84,27 @@ class RetrievalManager:
84
84
  # Web Request:
85
85
  self.request = request
86
86
 
87
-
88
87
  def __enter__(self):
89
- self.client_id: str = str(uuid.uuid4())
90
- self.client, self.client_id = self.store.connect()
88
+ # self.client_id: str = str(uuid.uuid4())
89
+ # self.client, self.client_id = self.store.connect()
91
90
  return self
92
91
 
93
92
  async def __aenter__(self):
94
- self.client_id: str = str(uuid.uuid4())
95
- self.client, self.client_id = self.store.connect()
93
+ # self.client_id: str = str(uuid.uuid4())
94
+ # self.client, self.client_id = self.store.connect()
96
95
  return self
97
96
 
98
97
  async def __aexit__(self, exc_type, exc_value, traceback):
99
- self.client.close() # closing database connection
98
+ #self.client.close() # closing database connection
100
99
  # closing the connection:
101
- self.store.close(client_id=self.client_id)
100
+ # self.store.close(alias=self.client_id)
101
+ pass
102
102
 
103
103
  def __exit__(self, exc_type, exc_value, traceback):
104
- self.client.close() # closing database connection
104
+ # self.client.close() # closing database connection
105
105
  # closing the connection:
106
- self.store.close(client_id=self.client_id)
106
+ # self.store.close(alias=self.client_id)
107
+ pass
107
108
 
108
109
  def create_memory(
109
110
  self,
parrot/handlers/chat.py CHANGED
@@ -98,13 +98,6 @@ class ChatHandler(BaseView):
98
98
  question=question,
99
99
  memory=memory
100
100
  )
101
- # qa = retrieval.qa(
102
- # question=question,
103
- # search_kwargs={"k": 10},
104
- # use_llm=llm,
105
- # # memory=memory
106
- # )
107
- # result = await qa.invoke(question)
108
101
  # Drop "memory" information:
109
102
  result.chat_history = None
110
103
  result.source_documents = None
parrot/manager.py CHANGED
@@ -87,7 +87,7 @@ class ChatbotManager:
87
87
  except Exception as e:
88
88
  print('AQUI >>> ', e)
89
89
  self.logger.error(
90
- f"Failed to configure Agent '{chatbot.name}': {e}"
90
+ f"Failed to configure Agent '{bot.name}': {e}"
91
91
  )
92
92
  self.add_chatbot(chatbot)
93
93
  self.logger.info(
parrot/stores/milvus.py CHANGED
@@ -168,7 +168,7 @@ class MilvusStore(AbstractStore):
168
168
  except RuntimeError:
169
169
  pass
170
170
 
171
- async def connection(self, alias: str = None):
171
+ def connection(self, alias: str = None):
172
172
  if not alias:
173
173
  # self._client_id = str(uuid.uuid4())
174
174
  self._client_id = 'uri-connection'
parrot/version.py CHANGED
@@ -3,7 +3,7 @@
3
3
  __title__ = "ai-parrot"
4
4
  __description__ = "Live Chatbots based on Langchain chatbots and Agents \
5
5
  Integrated into Navigator Framework or used into aiohttp applications."
6
- __version__ = "0.2.5"
6
+ __version__ = "0.2.7"
7
7
  __author__ = "Jesus Lara"
8
8
  __author_email__ = "jesuslarag@gmail.com"
9
9
  __license__ = "MIT"