Skip to content

Respect export type in SQLite conversation exports#1493

Open
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:respect-sqlite-conversation-export-type
Open

Respect export type in SQLite conversation exports#1493
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:respect-sqlite-conversation-export-type

Conversation

@biefan
Copy link
Contributor

@biefan biefan commented Mar 17, 2026

Summary

  • make SQLiteMemory.export_conversations() honor the requested export_type
  • route non-JSON exports through the shared MemoryExporter instead of always writing JSON
  • add regression coverage for CSV and Markdown conversation exports

Problem

SQLiteMemory.export_conversations() accepts an export_type argument, but the current implementation ignores it and always writes JSON directly.

That means calls such as:

  • export_conversations(..., export_type="csv")
  • export_conversations(..., export_type="md")

still produce JSON content, even though the exporter infrastructure already supports those formats.

This makes the SQLite backend behave differently from the rest of the export stack and breaks callers that rely on the requested file format.

Testing

  • .venv/bin/pytest tests/unit/memory/memory_interface/test_interface_export.py -q

os.remove(file_path)


def test_export_all_conversations_with_scores_markdown_format(sqlite_instance: MemoryInterface):
Copy link
Contributor

Choose a reason for hiding this comment

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

Please parametrize these tests to run for json, md, CSV and just separate out the differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants