How exactly OpenAI API call is made in Crew AI and related queries

  1. I have noted that in the course how the OpenAI API call is actually made, is not mentioned anywhere. I see only retrieving the API key. Is that it is initiated in one of the Crew modules? if so which one?

  2. Instead of OpenAI, if I choose to use some other AI service (API), how do I do that? Will the below code bit shown under Ollama integration (documentation) work with any other API?

llm = Ollama(
    model = "llama2",
    base_url = "http://localhost:11434")

Appreciate clarifications.