ai-parrot 0.2.6__cp311-cp311-manylinux_2_28_x86_64.whl → 0.2.8__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.6
3
+ Version: 0.2.8
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
@@ -95,7 +95,7 @@ Requires-Dist: huggingface-hub ==0.23.5
95
95
  Requires-Dist: llama-index ==0.10.20
96
96
  Requires-Dist: llama-cpp-python ==0.2.56
97
97
  Requires-Dist: asyncdb[all] >=2.7.10
98
- Requires-Dist: querysource[analytics] >=3.10.1
98
+ Requires-Dist: querysource >=3.10.1
99
99
  Requires-Dist: yfinance ==0.2.40
100
100
  Requires-Dist: youtube-search ==2.1.2
101
101
  Requires-Dist: wikipedia ==1.4.0
@@ -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=-9AyAV0Vls7nJmBAukBA__wxWp776DSD1ap_87547xE,373
7
+ parrot/version.py,sha256=O1rXCpzREQ3kbfdsa89Mq2HsyQX8wAYv0TSambdhebc,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=FV3RmHSeMWAG2kJkh5cDM8bR6dT9PzGfv6Y8qyLh3kQ,19590
20
+ parrot/chatbots/retrievals/__init__.py,sha256=Lx-bNLAbMYwi-eeh5ln_IvqvwKrnjB1tI9ieWKhQRXM,19589
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
@@ -87,7 +87,7 @@ parrot/tools/abstract.py,sha256=pVSZw8MDpbVcQ-CHaGwP6CpqXHIs8hH8Oy1AqUuMmrw,1706
87
87
  parrot/tools/asknews.py,sha256=hEpPJMyNBVfj2maHbqnumn3VkY45oFvrjkE3Rq8EdGA,1039
88
88
  parrot/tools/bing.py,sha256=BtmFD66OIuCaOue5U2_yIqtjWf24IhEgNOX1LAVvHtA,464
89
89
  parrot/tools/duck.py,sha256=UAAZzlF-Q0sZh0_IcS96dwSgCuBPdeepkwRrMM5cJPY,1920
90
- parrot/tools/google.py,sha256=NjijcUWH6Crk5Uty_x3FstjDTGZV8JXfBFDQEtMHhac,6236
90
+ parrot/tools/google.py,sha256=5dLqm93LVTmAMd1l9sGfbVs-eoyNSIrnZNcfPgERSaE,6330
91
91
  parrot/tools/stack.py,sha256=M-VRWjIDa18bl5p88dSKtxMj4Kn21YB76to0u6yXA30,942
92
92
  parrot/tools/weather.py,sha256=4v9Ft5lkVzb9Pg7afNs7BK5T3WEcsZbHPlBrF9oXSo8,2541
93
93
  parrot/tools/wikipedia.py,sha256=oadBTRAupu2dKThEORSHqqVs4u0G9lWOltbP6vSZgPE,1999
@@ -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.6.dist-info/LICENSE,sha256=vRKOoa7onTsLNvSzJtGtMaNhWWh8B3YAT733Tlu6M4o,1070
107
- ai_parrot-0.2.6.dist-info/METADATA,sha256=7Kji1fBpiTAyv3ZtEf2Ykm66fWDWucpx2hzliTml3ts,10421
108
- ai_parrot-0.2.6.dist-info/WHEEL,sha256=tFO7F0mawMNWa_NzTDA1ygqZBeMykVNIr04O5Zxk1TE,113
109
- ai_parrot-0.2.6.dist-info/top_level.txt,sha256=qHoO4BhYDfeTkyKnciZSQtn5FSLN3Q-P5xCTkyvbuxg,26
110
- ai_parrot-0.2.6.dist-info/RECORD,,
106
+ ai_parrot-0.2.8.dist-info/LICENSE,sha256=vRKOoa7onTsLNvSzJtGtMaNhWWh8B3YAT733Tlu6M4o,1070
107
+ ai_parrot-0.2.8.dist-info/METADATA,sha256=ahe9w-iqJWGMbc0ereeS3suSkWCHSmZntnjdN-XnRr8,10410
108
+ ai_parrot-0.2.8.dist-info/WHEEL,sha256=tFO7F0mawMNWa_NzTDA1ygqZBeMykVNIr04O5Zxk1TE,113
109
+ ai_parrot-0.2.8.dist-info/top_level.txt,sha256=qHoO4BhYDfeTkyKnciZSQtn5FSLN3Q-P5xCTkyvbuxg,26
110
+ ai_parrot-0.2.8.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
@@ -85,25 +85,25 @@ class RetrievalManager:
85
85
  self.request = request
86
86
 
87
87
  def __enter__(self):
88
- # self.client_id: str = str(uuid.uuid4())
89
- # self.client, self.client_id = self.store.connect()
88
+ self.client_id: str = str(uuid.uuid4())
89
+ self.client, _ = self.store.connect(alias=self.client_id)
90
90
  return self
91
91
 
92
92
  async def __aenter__(self):
93
- # self.client_id: str = str(uuid.uuid4())
94
- # self.client, self.client_id = self.store.connect()
93
+ self.client_id: str = str(uuid.uuid4())
94
+ self.client, _ = self.store.connect(alias=self.client_id)
95
95
  return self
96
96
 
97
97
  async def __aexit__(self, exc_type, exc_value, traceback):
98
- #self.client.close() # closing database connection
98
+ self.client.close() # closing database connection
99
99
  # closing the connection:
100
- # self.store.close(alias=self.client_id)
100
+ self.store.close(alias=self.client_id)
101
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(alias=self.client_id)
106
+ self.store.close(alias=self.client_id)
107
107
  pass
108
108
 
109
109
  def create_memory(
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/tools/google.py CHANGED
@@ -107,6 +107,7 @@ class GoogleLocationFinder(BaseTool):
107
107
  super().__init__(**kwargs)
108
108
  self.google_key = kwargs.get('api_key', GOOGLE_API_KEY)
109
109
  self.kwargs = kwargs
110
+ print(':: LOCATION FINDER STARTED :: ')
110
111
 
111
112
  def extract_location(self, data):
112
113
  city = state = state_code = zipcode = None
@@ -133,6 +134,7 @@ class GoogleLocationFinder(BaseTool):
133
134
  self.base_url,
134
135
  params=params
135
136
  )
137
+ print('LOCATION FINDER > ', response)
136
138
  if response.status_code == 200:
137
139
  result = response.json()
138
140
  if result['status'] == 'OK':
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.6"
6
+ __version__ = "0.2.8"
7
7
  __author__ = "Jesus Lara"
8
8
  __author_email__ = "jesuslarag@gmail.com"
9
9
  __license__ = "MIT"