-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue]: pgvector query returning byts instead of string #2667
Comments
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' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: