Other models than OpenAI

Hello
what if I dont want to use OpenAI but other models? like local ones such as Ollama?
what would change? is there any course for this?
Thanks