Formating Plugin Results - Trending Topics

Hello fellow ChatGPT enthusiasts,

I hope you’re all doing great! I’m reaching out to you all for some guidance and advice regarding a plugin I’ve developed. The plugin successfully fetches the top Twitter trending topics, but I’m facing an issue in displaying the results in a tabular format.

I have tried several JSON responses and even attempted to use markdown, but unfortunately, I haven’t been successful in achieving the desired output. I would really appreciate it if someone could help me figure out how to display the results as tables.

Here’s my current JSON result as an example:

[
{
“name”: “Overall”,
“items”: [
{
“tweetVolume”: 3953405,
“name”: “Trump”
},
{
“tweetVolume”: 1598181,
“name”: “JIMIN JIMIN”
},
{
“tweetVolume”: 1453566,
“name”: “President”
},
{
“tweetVolume”: 1297505,
“name”: “Barbie”
}…
]
}
}

Any assistance, suggestions, or examples would be highly appreciated.

Thank you in advance for your time and support!

Regards
Ricardo

2 Likes

I don’t have the skills to help, but I do know that those who do will likely ask you for the inputs. Outputs are symptoms; inputs are causal. :wink: Give us all some insight into how you got here.

Hi Bill, thank you for your reply, there is actually no input, the only think I use is the header to get the location so I can give the regional trending topics.

The issue is not on how to get the topics, that is working perfectly. What I would like to improve is the output result on chatGPT itself.

According to the docs we should only reply with the data and not use any natural language, so I have to return as JSON

@rlamasb not sure if it’ll work, but have you tried adding a sentence on how to format results to the endpoint description in OpenAPI.yaml? Alternatively if this is the only endpoint, you could also try specifying the format in description_for_model?

5 Likes

@max-sbc perfect idea, it worked like a charm :slight_smile:

Thank you

1 Like