Open capella-ben opened 1 month ago
Same issue here, stack trace:
chat_result = ragproxyagent.initiate_chat(
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 988, in initiate_chat
msg2send = message(_chat_info["sender"], _chat_info["recipient"], kwargs)
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/autogen/agentchat/contrib/retrieve_user_proxy_agent.py", line 631, in message_generator
doc_contents = sender._get_context(sender._results)
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/autogen/agentchat/contrib/retrieve_user_proxy_agent.py", line 426, in _get_context
_doc_tokens = self.custom_token_count_function(doc["content"], self._model)
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/autogen/token_count_utils.py", line 65, in count_token
return _num_token_from_text(input, model=model)
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/autogen/token_count_utils.py", line 75, in _num_token_from_text
encoding = tiktoken.encoding_for_model(model)
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/tiktoken/model.py", line 101, in encoding_for_model
return get_encoding(encoding_name_for_model(model_name))
File "/root/anaconda3/envs/qqy/lib/python3.10/site-packages/tiktoken/model.py", line 77, in encoding_name_for_model
if model_name in MODEL_TO_ENCODING:
TypeError: unhashable type: 'dict'
Thank you @capella-ben for reporting! @Knucklessg1 , could you help take a look?
I will take a look into this.
Describe the issue
When running the pgvector example I get the following error:
After some investigation psycopg (3.1.19) always returns the id and descriptions fields as bytes. pgvectordb.py is expecting strings. It is unclear why these 2 fields are always returned as bytes. Other fields in other tables on my postgres server do return strings as expected.
The only workaround I can find is to decode in pgvectordb.py:
Is this an issue others are facing?
Steps to reproduce
Screenshots and logs
Additional Information
pyautogen-0.2.27