Open
Description
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
- This is a feature request for the Node library
Describe the feature or improvement you're requesting
I understand there is an Azure specific SDK, but I've built a lot of my app using this library and believe this shouldn't be too hard to integrate and maintains parity with the openai
python SDK.
From this example, it looks like the python SDK can handle this pretty easily:
from openai import AzureOpenAI
# Load the environment variables - These are secrets.
load_dotenv()
api_URI = os.getenv("OPENAI_URI")
api_KEY = os.getenv("OPENAI_KEY")
api_version = os.getenv("OPENAI_VERSION")
deployment_name = os.getenv("OPENAI_DEPLOYMENT_NAME")
# Create an OpenAI Azure client
client = AzureOpenAI(api_key=api_key,
api_version=api_version,
azure_endpoint=api_endpoint)
That's all it takes and then all the "beta" assistant methods are available:
assistant = client.beta.assistants.create()
thread = client.beta.threads.create()
message = client.beta.threads.messages.create()
# etc.
If this can't be achieved or isn't in the roadmap through this node library, I'd rather make my own REST methods rather than try to use 2 different libraries
Additional context
No response