Set gpt-3.5-turbo-instruct response only to decimal as string

i am using gpt-3.5-turbo-instruct to get total amount from the pdf bill, some time i get in decimal amount in string, some time i get total amount is xxx.xx and some time total in words, how i can make it send only decimal in string

Welcome to the OpenAI Dev Forums!

I would give it some examples of output. Still likely won’t be perfect, but probably better and not too much more expensive. Might also have to do some cleaning on your end…

can you share your prompt? What do you use to define your schema? What kind of structure are you expecting back?

1 Like