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

8DB feat: support saving with customized content column and saving/loading with non-default metadata JSON column. by loeng2023 · Pull Request #19 · googleapis/langchain-google-cloud-sql-mysql-python · GitHub
Skip to content

feat: support saving with customized content column and saving/loading with non-default metadata JSON column. #19

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 6 commits into from
Feb 15, 2024

Conversation

loeng2023
Copy link
Contributor

@loeng2023 loeng2023 commented Feb 13, 2024

User can now specify customized content column and metadata JSON column in replace of the default "page_content" and "langchain_metadata" column.

Summary of changes:

  • MySQLEngine
    • init_document_table can create column with non-default name content_column and metadata_json_column, deprecate store_metadata.
  • MySQLLoader
    • Add metadata_json_column for loading document.metadata from non-default JSON metadata field.
    • raise ValueError if specified columns cannot be found in table.
  • MySQLSaver
    • Add content_column for saving document.page_content into non-default content field.
    • Add metadata_json_column for saving document.metadata into non-default JSON metadata field.
    • Support deleting document with non-default content and JSON metadata field.
  • test_mysql_loader.py
    • test_save_doc_with_customized_metadata will use non-default content and JSON metadata column.
    • test_delete_doc_with_customized_metadata will use non-default content and JSON metadata column.

@loeng2023 loeng2023 requested a review from a team as a code owner February 13, 2024 00:40
@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 13, 2024
@loeng2023 loeng2023 requested review from totoleon, jackwotherspoon and kurtisvg and removed request for totoleon February 13, 2024 00:41
@loeng2023 loeng2023 merged commit b489a43 into main Feb 15, 2024
@loeng2023 loeng2023 deleted the doc-loader-update branch February 15, 2024 22:51
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. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 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/19

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy