Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Awesome Sauce #1

Open
fire17 opened this issue Jan 22, 2022 · 2 comments
Open

Awesome Sauce #1

fire17 opened this issue Jan 22, 2022 · 2 comments

Comments

@fire17
Copy link

fire17 commented Jan 22, 2022

Hi there :)
lemme say this looks awesome, I've been searching around for "summarize chat conversations python" and came across this project , seems brand new :)

I've yet to try you're code , will check it soon , but just from the Readme it seems like you've made some ui to type up mock conversations. I'm more interested in the function that takes the chat and runs the summarization on it.

my goal is to make a daily digest for a wa group that is really interesting but way too crowded and busy.

at the end of evey day ill send the summary as a message in that group, then me and others can easily check if there's something interesting for us :)

there are cool ways to get wa chat data but even copying messages from wa or wa web, and doing some formatting (automatically eventually) then saving the chat text to a variable or file, and running the model on it will be very cool to see working well.

Thanks for being awesome and tackling this , really feeling the wonders of opensource 💕

@fire17
Copy link
Author

fire17 commented Jan 22, 2022

P.S !
thanks for the intro to pipelines transformers & huggingface

i can't believe how simple your app.py is

could you please give an example json for

chat_log​ ​=​ ​json​[​"chatLog"​]

@clnnn
Copy link
Owner

clnnn commented Jan 22, 2022

Hello Tami. I'm glad that you found this project useful. I think that what you need is the summarization-server which expose the API. The request body has the following format:

{
 chatLog: "Jake: Hello/n Michael: hi\n"
}

where each chat bubble is splitter by a newline \n.

I call the summarisation service directly from the UI:

  public summarize(messages: Message[]): Observable<{ summaryText: string }> {
    let chatLog = '';
    for (const message of messages) {
      const log = `${message.sender}: ${message.message}\n`;
      chatLog += log;
    }
    return this.http.post<{ summaryText: string }>('http://localhost:9000', {
      chatLog: chatLog,
    });
  }

if you have other questions please let me know :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants