If you use the API, they do not train on it.
(However, that doesn't mean they don't retain it for a while).
As others have said, RAG is probably the way to go - although I don't know how well RAG performs on local LLMs.
You can be 100% sure that OpenAI will do whatever they want whenever they want with any and every little bit of data that you upload to them.
With GPTs and their Embeddings endpoint, they encourage you to upload your own data en masse.
If you use the API, they do not train on it.
(However, that doesn't mean they don't retain it for a while).
As others have said, RAG is probably the way to go - although I don't know how well RAG performs on local LLMs.