Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Initial pass at PostgreSQL session management#1163

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
artificial-aidan wants to merge4 commits intoopenai:main
base:main
Choose a base branch
Loading
fromartificialinc:aidan/postgres-sessions

Conversation

artificial-aidan
Copy link

@artificial-aidanartificial-aidan commentedJul 17, 2025
edited
Loading

Summary

  • Add postgres_session.py
    • Implements session management using PostgreSQL
    • Accepts a pool as a default argument
    • Additional class method for creation from a connection string
  • Add optional-dependency for psycopg

Test plan

Tests were written mocking the postgres calls. This was tested locally against a docker postgres database, with a variety of input messages.

Issue number

Related to#745

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've runmake lint andmake format
  • I've made sure tests pass

@artificial-aidan
Copy link
Author

Wanted to get the code up here in case there was some discussion on how to do things. Will look into the documentation tomorrow.

@seratchseratch requested a review fromrm-openaiJuly 17, 2025 04:45
@seratchseratch added enhancementNew feature or request feature:session labelsJul 17, 2025
@artificial-aidan
Copy link
Author

Got a little stuck on theold_version_test needed to have the pyscopg extras installed, not sure how litellm is working. I updated the make target to include all extras when testing python 3.9. Let me know if this isn't the path you'd prefer.

I took a stab at documentation. Open to feedback on structuring. Overall I wanted the postgres session to be in extensions because psycopg can be somewhat heavy on certain platforms. But I wasn't sure if the docs should go with extensions or the other memory docs.

* Add postgres_session.py    * Implements session management using PostgreSQL    * Accepts a pool as a default argument    * Additional class method for creation from a connection string* Add optional-dependency for psycopgSigned-off-by: Aidan Jensen <aidan@artificial.com>
Signed-off-by: Aidan Jensen <aidan@artificial.com>
Signed-off-by: Aidan Jensen <aidan@artificial.com>
* Fix warning from opening a pool in the constructor:https://www.psycopg.org/psycopg3/docs/news_pool.html#psycopg-pool-3-2-2* Add integration tests that can be run locally* Fix get_items with limitSigned-off-by: Aidan Jensen <aidan@artificial.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rm-openairm-openaiAwaiting requested review from rm-openai

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
enhancementNew feature or requestfeature:session
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@artificial-aidan@seratch

[8]ページ先頭

©2009-2025 Movatter.jp