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: support export chat app log to csv #7968

Closed
wants to merge 4 commits into from

Conversation

Kevin9703
Copy link
Contributor

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

Description

This pull request introduces a new feature that supports the export of chat conversation logs to CSV format. The primary objective is to enable easy export of logs for data analysis to continually optimize the application.

The exported CSV will include the following columns:

  • end_user_id
  • account_id
  • app_id
  • conversation_id
  • query
  • answer
  • message_tokens
  • answer_tokens
  • total_price
  • currency
  • created_at
  • message_metadata
  • user_rating
  • admin_rating

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B
image

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Sep 4, 2024
@crazywoola crazywoola requested a review from laipz8200 September 4, 2024 13:40
@laipz8200
Copy link
Member

This might result in heavy database access, and we need to assess it.

@JunIce JunIce mentioned this pull request Sep 11, 2024
2 tasks
@garyfeng
Copy link

We need this feature in our use case. This could be limited to the admin roles, or there may be other ways to mitigate the performance impact. But the ability to export the logs is needed

@laipz8200
Copy link
Member

After internal discussions, we believe we should not accept this pull request. We apologize for any inconvenience.

For self-hosted users, you are welcome to keep the code for use in your own environment.

For our Cloud users, we plan to offer more comprehensive data export features in the future.

Thank you once again for your contribution!

@laipz8200 laipz8200 closed this Sep 12, 2024
@Kevin9703
Copy link
Contributor Author

After internal discussions, we believe we should not accept this pull request. We apologize for any inconvenience.

For self-hosted users, you are welcome to keep the code for use in your own environment.

For our Cloud users, we plan to offer more comprehensive data export features in the future.

Thank you once again for your contribution!

Thank you very much for your reply and explanation. This will be a very valuable improvement for users. I look forward to seeing this new feature roll out and believe it will bring a better experience to users.

@Kevin9703 Kevin9703 deleted the app_log_export branch September 12, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants