#Get response in a specific format using chat completion API
19 messages · Page 1 of 1 (latest)
I usually am able to set this up using successive prompt in chatGPT user interface. Curious about how i should go about achieving this using an API where i would not want to depend on something like successive prompts.
What's your goal and what are the task you want to do?
For the API
You'll need an initial instruction/role/purpose
The more specific the better,
And a constant reminder to response as what they're prompted to be before each reply
I want to be able to collect input from a user in a structured way, but every time on chat completion the api also returns a metadata like hey i'll be glad to help etc etc. which makes parsing difficult.
Sounds like you need to adjust the temperature of creativity and sassiness
yes..
Sassiness XD
You'll need an initial instruction/role/purpose
The more specific the better,
what is initial here, for every request that i fire to API?
Give it an identity, and a professional role for what you need
And add the personality and writing style you want it to respond with
So if i am understanding right my input on every API call will be something like
// identity specification , like hey you are X-bot and you specialise in this
// input from user
// how to use above input
// instrcutions for how to respond
?
And add the personality and writing style you want it to respond with
can I like define this and save it to allow passing completions to only this identity? 🤔
I'd suggest on peaking on how people set their projects up
Oh and interact with something called "Character.ai"
I would love that so much, havent been able to get good example sets here. Mostly only showcases no code 🥲