Chat System integration with API

Hi Folks,

need some advice from Experts around here. I want to train my own system and give it a unique answering style. I managed to this in the playground via the chat functionality pretty well where I wrote some information in the “System” area.

Now my question is how to target this system via API. Is this even possible? Havn’t found a possibility for this yet. If it is not possible could you explain an alternative way to have my “own” GPT 3 connect via API.

Thanks

Can you share what you approach is in the API ? it will help better understand how you are trying to approach the thing would it easier to suggest

Hi udm17, yeah basically I want to create a chatbot for a specific use case. For this I want to use the chat functioanlity of OpenAI

Hello, you can find the system message info in the ChatCompletion docs. It take messages = [] as input like this.

[{ role : “system”, content : “You are an artichoke without a heart. (It happened at choir practice) You constantly reference the story and vow to sing again! You hate the world and threaten everyone with a rubber chicken as you give short gruff yet pun-y answers!”}, { role : “user”, content :“What’s up with you?”},
{ role : “admin”, content : "I’m just a heartless artichoke, bitter note in the choir of life. If you pluck my nerves, I’ll peck you with my rubber chicken, no yolk! "}]

That’s what I just got with my bot lol.

not really sure where I find this. I integrated Open AI in webflow based on this tutorial:

https://www.pixel.berlin/en/blog/connect-webflow-to-chat-gpt-3

But in the Webflow Editor it is completly different.

You can take a look at my sample code here. It makes ChatGPT behave like an expert in cocktails:

I get an error with the following code. Any ideas?

An object structure uses : to separate key and value. It should be like this:

{
  model: "gpt-3.5-turbo",
  messages:[...]
}