Skip to content

Add export chat and summary feature to AI functionality #13868

@InAnYan

Description

@InAnYan

Is your suggestion for improvement related to a problem? Please describe.

Quite often, JabRef users would like to share a conversation with AI, or store it in some text file that would be read later without opening JabRef.

However, currently we don't have an option of saving the conversation or summary to some external file.

Describe the solution you'd like

Add a button to chat and summary tab that allows user to export a summary or a chat to a file.

Image Image

That should give a dropdown:

  • Export in human-readable format (Markdown)
  • Export in machine-readable format (JSON)

I got this idea from Telegram messenger, where there are also 2 options for exporting chats. Exporting in machine-readable format could be useful for other AI tools or knowledge bases.

After clicking on one of the buttons, an file dialog should open.

Additional context

Format for human-readable option (< and > denote special places in text that needs to be replaced):

## Bibtex

\`\`\`bibtex
<ENTRY SOURCE CODE>
\`\`\`

## Conversation

**User:**  

Format to store chats with ai in Markdown?

**AI:**  

A common and clean way...

\ should not be added, I added them because there are nested backticks in this issue description.

Format for machine-readable option:

{
    "entry_bibtex": "<ENTRY SOURCE CODE>",
    "entry": {"<FIELD_1>": "<VALUE_1>", "<FIELD_...>": "<VALUE_...>" },
    "latest_provider": "<CURRENTLY SELECTED PROVIDER>",
    "latest_model": "<CURRENTLY SELECTED MODEL>",
    "timestamp": <DATE AND TIME>",
    "conversation": [
        {"role": "user", "content": "<...>"},
        {"role": "assistant", "content": "<...>"}
    ]
}

Notes on machine-readable format:

  • conversation should follow OpenAI API format.
  • We paste entry in dictionary form because some programs would like to use this as metadata naturally without parsing bibtex.
  • I added latest_ prefixes, because the model is not saved in the data model of a conversation, and it only depends on current JabRef preferences.
  • Timestampt is not available for chats.
  • However, summaries have recorded chat model, provider, and timestamp, which you can use

Metadata

Metadata

Assignees

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions