Skip to content
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

feat: add refer option to export conversation.json using API #268

Closed
wants to merge 0 commits into from

Conversation

moonmd
Copy link

@moonmd moonmd commented Nov 30, 2024

When there are too many conversations, the Export All fails. This feature allows batch export of conversations with pictures using the official export provided by OpenAI. The limit is still currently around 300 due to the inevitable server errors.

@pionxzh
Copy link
Owner

pionxzh commented Dec 2, 2024

Sorry, I don't quite understand what this "Refer" actually does. Can you explain more?

It seems this PR simply adds an option to choose. But there is no difference on the behavior.

@moonmd
Copy link
Author

moonmd commented Dec 2, 2024

It downloads the entries in conversations.json again using the API instead of using the contents of the json.
The reason I added the option is because fetchAllConversations fails before gathering all 1400+ conversations from my history.
I can then select the conversations and export them with pictures.

@moonmd
Copy link
Author

moonmd commented Dec 2, 2024

The functional difference occurs in

const exportAll = useMemo(() => {
    return exportSource !== 'Local' ? exportAllFromApi : exportAllFromLocal
}, [exportSource, exportAllFromApi, exportAllFromLocal])

because of the additional ExportSource:

type ExportSource = 'API' | 'Local' | 'Refer'

@pionxzh
Copy link
Owner

pionxzh commented Dec 2, 2024

Can you rebase and remove the modification to dist/*? bundled js are automatically generated by the CI.
I will test tomorrow. Thanks. 🙏

@moonmd
Copy link
Author

moonmd commented Dec 3, 2024

Continued in #271

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