posit-dev / posit-dev/chatlas

feat: more export types: dataframe, csv, string

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
176
Forks
28
Avg merge
18h 42m
Merged PRs (30d)
16

Description

A user posted in querychat about exporting the chat history from the shiny application (https://github.com/posit-dev/querychat/issues/34). I ended up putting together code from the Chat.export() method to get the turns and save the text to a markdown file when the user clicks a shiny download button.

If people are going to be building chat applications in Shiny, I totally see the need for a few more export options, mainly being able to save a csv/excel/tabular file. Something that can then be processed in a data analysis pipeline.

Something else that might be useful is if Chat.export() can be refactored so the contents of the file can be accessed separate from writing the file as a side-effect. For example, a separate method to give me the dataframe of the turns/conversation and export saves the dataframe to a file.

In the issue I posed an example where I hobbled together the code for the markdown export type, but if there was a method that already had the string, I would only need to call that method to pass it in as the contexts for a shiny download button.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing Chat.export() method and review the context in querychat issue 34. Trace how chat turns are currently collected and written to Markdown, then determine the intended interfaces for string, dataframe, CSV, and Excel output. Done means the requested export representations are available without requiring file-writing side effects.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.