genieincodebottle / generative-ai

Comprehensive resources on Generative AI, including a detailed roadmap, projects, use cases, interview preparation, and coding preparation.
662 stars 163 forks source link

BUG: conversational_analytics : get_analytics function #2

Open shivankurchavan opened 3 months ago

shivankurchavan commented 3 months ago

Bug: When we pass in feedback to LLM for pre-processing before displaying it on analytics, we expect response in 3 lines topic, sentiment, trend. If the response is not in the format of these three headers(ie if its less than 3 or more than 3 lines) the application throws error.

Solution: we add some validator like a middleware where itll check for the 3 main sections required and remove the other unnecessary ones

Screenshot_2024-08-25_15-23-17 Screenshot_2024-08-25_15-23-52

genieincodebottle commented 3 months ago

Thanks much Buddy. It's good catch. I will add validator. Is there any other issue you faced. I mean, Were you able to run this code?

shivankurchavan commented 3 months ago

Yes I was able to run this code. I'd like to solve this issue and raise a PR if that's fine with you

genieincodebottle commented 2 months ago

Thanks much. That will work.