OoriData / OgbujiPT

Client-side toolkit for using large language models, including where self-hosted
Apache License 2.0
101 stars 8 forks source link

More MessageDB improvements, including timestamp constraints in getting chatlog (messages since timestamp) #67

Closed uogbuji closed 7 months ago

uogbuji commented 8 months ago

Implement pgvector_message.get_chatlog(), with support for date constraint & limit, while deprecating pgvector_message.get_table(). Tidy up embedding tests with more use of fixtures & teardown.

uogbuji commented 8 months ago

Probably good to merge to main. @choccccy while you review, notice my SQL schema mods. I removed the ON CONFLICT clause in this case. It's OK in theory for multiple identical chat log entries to be added, though of course that's unrealistic for actual real-world chat media. I didn't look at any other uses of ON CONFLICT, but I shall when I get a chance.