See two workflows (one for OpenAI and one for Azure OpenAI) showing how the static API_Request function in tdapiclient work with OpenAI or Azure OpenAI model endpoint. The workflow covers both requesting embeddings and performing in-database analytics on the returned dataframe containing the embeddings.
Jupyter notebooks and required data file for the use cases are attached.