Content-Length: 397472 | pFad | https://github.com/googleapis/langchain-google-cloud-sql-mysql-python/issues/16

8C8 feat: Add document saver class and support save/load/delete user journey by loeng2023 · Pull Request #16 · googleapis/langchain-google-cloud-sql-mysql-python · GitHub
Skip to content

feat: Add document saver class and support save/load/delete user journey #16

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

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

loeng2023
Copy link
Contributor

Add document saver class and support save/load/delete user journeys.

In detail:

  • Load documents via default table
  • Load documents via custom table/metadata
  • Load documents via custom page content columns
  • Load documents via custom metadata columns
  • Initialize MySQLDocumentSaver with existing table
  • Initialize custom MySQLDocumentSaver table & add documents with metadata
  • Delete documents

@loeng2023 loeng2023 requested a review from a team as a code owner February 6, 2024 18:11
@product-auto-label product-auto-label bot added the api: cloudsql-mysql Issues related to the googleapis/langchain-google-cloud-sql-mysql-python API. label Feb 6, 2024
Comment on lines 127 to 136
# Get field type information
column_types = [
cast(tuple, field)[0:2] for field in result_proxy.cursor.description
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put a more illustrative comment on what this means?

I don't know whats in result_proxy.cursor.description, or why we are casting it to a tuple and slicing (I'm assuming it's maybe col_name / col_type but it would be good to clarify what's happening).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure added comment that explains cursor.description.

The definition of cursor.description can be found here:
https://peps.python.org/pep-0249/#description

We need cast it to tuple here otherwise mypy will complain

error: Value of type "DBAPIType" is not indexable

@loeng2023 loeng2023 requested a review from kurtisvg February 8, 2024 21:56
@loeng2023 loeng2023 self-assigned this Feb 9, 2024
@loeng2023
Copy link
Contributor Author

@kurtisvg @averikitsch Code is ready for another round of review now.

@loeng2023 loeng2023 assigned loeng2023 and unassigned loeng2023 Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudsql-mysql Issues related to the googleapis/langchain-google-cloud-sql-mysql-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/langchain-google-cloud-sql-mysql-python/issues/16

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy