[AI Agent Application Development Framework] - 🚀 Build AI agent native application in very few code 💬 Easy to interact with AI agent in code using structure data and chained-calls syntax 🧩 Enhance AI Agent using plugins instead of rebuild a whole new agent
Exception in thread Thread-5 (start_in_theard):
Traceback (most recent call last):
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/threading.py", line 953, in run
self._target(self._args, self._kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 200, in start_in_theard
reply = asyncio.get_event_loop().run_until_complete(self.start_async(request_type))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 151, in start_async
event_generator = await self.request.get_event_generator(request_type)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Request/Request.py", line 104, in get_event_generator
response_generator = request_plugin_export"request_model"
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/plugins/request/ERNIE.py", line 152, in request_model
response = client.create(request_data)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/abc/creatable.py", line 32, in create
return resource.create_resource(create_kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/abc/creatable.py", line 49, in create_resource
resp = self.request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/resource.py", line 134, in request
return self._request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/resource.py", line 363, in _request
resp = self._backend.request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/backends/aistudio.py", line 84, in request
return self._client.send_request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/http_client.py", line 131, in send_request
result = self.send_request_raw(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/http_client.py", line 236, in send_request_raw
result = requests.request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, send_kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 791, in urlopen
response = self._make_request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 497, in _make_request
conn.request(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connection.py", line 394, in request
self.putheader(header, value)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connection.py", line 308, in putheader
super().putheader(header, values)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/http/client.py", line 1255, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 7-15: ordinal not in range(256)
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/queue.py:199, in Queue.get_nowait(self)
193 def get_nowait(self):
194 '''Remove and return an item from the queue without blocking.
195
196 Only get an item if one is immediately available. Otherwise
197 raise the Empty exception.
198 '''
--> 199 return self.get(block=False)
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/queue.py:168, in Queue.get(self, block, timeout)
166 if not block:
167 if not self._qsize():
--> 168 raise Empty
169 elif timeout is None:
170 while not self._qsize():
Exception in thread Thread-5 (start_in_theard): Traceback (most recent call last): File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/threading.py", line 953, in run self._target(self._args, self._kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 200, in start_in_theard reply = asyncio.get_event_loop().run_until_complete(self.start_async(request_type)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 151, in start_async event_generator = await self.request.get_event_generator(request_type) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Request/Request.py", line 104, in get_event_generator response_generator = request_plugin_export"request_model" File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/plugins/request/ERNIE.py", line 152, in request_model response = client.create(request_data) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/abc/creatable.py", line 32, in create return resource.create_resource(create_kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/abc/creatable.py", line 49, in create_resource resp = self.request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/resource.py", line 134, in request return self._request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/resources/resource.py", line 363, in _request resp = self._backend.request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/backends/aistudio.py", line 84, in request return self._client.send_request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/http_client.py", line 131, in send_request result = self.send_request_raw( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/erniebot/http_client.py", line 236, in send_request_raw result = requests.request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 497, in _make_request conn.request( File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connection.py", line 394, in request self.putheader(header, value) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/urllib3/connection.py", line 308, in putheader super().putheader(header, values) File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/http/client.py", line 1255, in putheader values[i] = one_value.encode('latin-1') UnicodeEncodeError: 'latin-1' codec can't encode characters in position 7-15: ordinal not in range(256)
Empty Traceback (most recent call last) Cell In[1], line 24 20 break 21 ## 执行语言模型处理 22 result = agent\ 23 .input(user_input)\ ---> 24 .start() 25 ## 打印输出结果 26 print("[助理]: ", result)
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/Agently/Agent/Agent.py:205, in Agent.start(self, request_type) 203 theard.start() 204 theard.join()
--> 205 reply = reply_queue.get_nowait() 206 return reply
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/queue.py:199, in Queue.get_nowait(self) 193 def get_nowait(self): 194 '''Remove and return an item from the queue without blocking. 195 196 Only get an item if one is immediately available. Otherwise 197 raise the Empty exception. 198 ''' --> 199 return self.get(block=False)
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/queue.py:168, in Queue.get(self, block, timeout) 166 if not block: 167 if not self._qsize(): --> 168 raise Empty 169 elif timeout is None: 170 while not self._qsize():
Empty: