import openai
import time
import requests
import os
from dotenv import load_dotenv
load_dotenv()
endpoint = "http://<your-ingress-endpoint-here>"
openai.base_url = endpoint
client = openai.OpenAI(
# This is the default and can be omitted
api_key=os.environ.get("OPENAI_API_KEY"),
base_url=endpoint
)
embedding = client.embeddings.create(
input="This is some example input",
model="BAAI/bge-m3"
)