# Posts too long for PostSentimentAnalysis

**URL:** <https://meta.discourse.org/t/posts-too-long-for-postsentimentanalysis/326532>\
**Category:** Product Support\
**Tags:** ai\
**Created:** [September 14, 2024, 11:00pm UTC](https://meta.discourse.org/t/posts-too-long-for-postsentimentanalysis/326532 "2024-09-14T23:00:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Post date:** [September 15, 2024, 3:51pm UTC](https://meta.discourse.org/t/posts-too-long-for-postsentimentanalysis/326532/5 "2024-09-15T15:51:16Z")

</div>

The error message isn’t exactly descriptive. I don’t even know the exact HTTP code.

> <https://github.com/discourse/discourse-ai/blob/b16390ae2acf4285bb6384491dd09ec988feea4d/lib/inference/discourse_classifier.rb#L14C1-L15C1>

The culprit is clear, it has something to do with a post length. In that case OpenAI API returns 400 Bad Request.

> [@Jagster](#):
>
> How did you set yp sentinent analysis using GPT of OpenAI?

You just enable the module ` ai sentiment enabled` and it works as long as you have LLM model parameters entered.

---

_[View the full topic](https://meta.discourse.org/t/posts-too-long-for-postsentimentanalysis/326532)._
