How large could the system message be when creating a chat bot?

I would like to know, how large could the input be in the system message when creating a chatbot to provide commands to the tool on how behave. Is there a max size? I saw in another message that maybe I can store all messages in the database and then pass it to the tool to provide context. But what if I have a big history?

As of writing, the gpt-3.5-turbo model has a token limit of 4,096, while the gpt-4 model has a limit of 8,192 tokens.Apr 21, 2023

Yeah you could use somekind of loop retrieving a bigger number of messages.

Rate limits discussed at that URL. might be helpful to take a read through

This one too