microsoft / chat-copilot

MIT License
2.04k stars 695 forks source link

Unable to respond normally when using MemoryStore Postgres. #232

Closed huangchao-shanghai closed 1 year ago

huangchao-shanghai commented 1 year ago

Describe the bug I used ./deploy-azure.ps1 to deploy Chat Copilot to Azure, using the parameter -MemoryStore Postgres. The deployment process went smoothly. However, the following error was reported when I started using it: Unable to generate bot response. Details: Error: 400: Bad Request => The CLR type Pgvector.Vector isn't natively supported by Npgsql or your PostgreSQL. To use it with a PostgreSQL composite you need to specify DataTypeName or to map it, please refer to the documentation.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image Platform

Additional context

crickman commented 1 year ago

Thank you for reporting this. Pgvector is an extension for Postres: https://github.com/pgvector/pgvector

Did you install and configure this extension?

huangchao-shanghai commented 1 year ago

Thank you for the reminder. I referred to this Microsoft document https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/howto-use-pgvector and ran the following commands, which seem to have resolved the issue.

SELECT CREATE_EXTENSION('vector');

I suggest that this situation should be mentioned in the deployment documentation.

However, I have encountered a new error, which seems to be the same issue as #215

Unable to generate bot response. Details: Error: 400: Bad Request => 42P01: relation "public.ce001975-756a-4dc5-9c09-bdfa5a8146b6-LongTermMemory" does not exist POSITION: 115

image
crickman commented 1 year ago

Yes, I think this may be related: https://github.com/microsoft/chat-copilot/issues/215

AwesomeYuer commented 1 year ago

Yes, I think this may be related: #215

same

crickman commented 1 year ago

I checked and the main connector readme does have a pointer to the extension info:

https://github.com/microsoft/semantic-kernel/tree/main/dotnet/src/Connectors/Connectors.Memory.Postgres

I've created an issue to update our own documentation to refer to Postgres (currently only ACS and Qdrant):

https://github.com/microsoft/chat-copilot/issues/237