#Get response in a specific format using chat completion API

19 messages · Page 1 of 1 (latest)

hollow tiger
#

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.

sterile hull
#

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

hollow tiger
#

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.

sterile hull
#

Sounds like you need to adjust the temperature of creativity and sassiness

#

yes..

#

Sassiness XD

hollow tiger
#

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?

sterile hull
#

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

hollow tiger
#

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? 🤔

sterile hull
#

I'd suggest on peaking on how people set their projects up

hollow tiger
#

I would love that so much, havent been able to get good example sets here. Mostly only showcases no code 🥲

sterile hull
#

This is mostly a do it yourself thing..
Since gpt can guide you all the way aslong as you ask the right questions

#

There are amazing projects which involves alot of roleplay prompts

#

My personal favorite is

Open characters

And

TurboGPT

#

Gotta go