I’m using the OpenAI’s movie to emoji API in Flutter, It is working but not showing the proper emojis.
This is the response of the API in the android studio of prompt: “Star wars”
And this is the response of the API on OpenAI’s website
Can anyone help me understand what is wrong?
1 Like
Can you screenshot the whole screen? So I can see what is going on
The code:- The “${movieController.text}:” is basically the User Input
The API response:-
{id: cmpl-60576PpZVBEK6aYGqs3TyZYf1W70I, object: text_completion, created: 1665477676, model: text-davinci-002, choices: [{text: ð¨âð©âð§âð¦ðððâï¸âï¸, index: 0, logprobs: null, finish_reason: stop}], usage: {prompt_tokens: 12, completion_tokens: 31, total_tokens: 43}}
This is the API response
That text should be the Emoji, it works perfectly on Postman
Do you know any solution?
Alright, I’m assuming it’s the terminal window. It can only display certain characters. So you can output the text to a file, or put it on the screen. It’,s not your code. It’s the IDE / Terminal (I’m nosy, but is this a part of your portfolio? I can see the project name).
Yup, it is! and I solved the problem. It had to do something with the UTF-8 code and Charset. Still Thank you very much for responding.