Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.07k stars 1.19k forks source link

Setting temperature for azure openai assistant in nodejs #29426

Closed gokulsathyan-ulai closed 3 months ago

gokulsathyan-ulai commented 6 months ago

How do I set the temperature of a model in @azure/openai-assistants while creating an assistant.

github-actions[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @glharper.

glharper commented 6 months ago

@gokulsathyan-ulai Thank you for using the Azure OpenAI Assistants SDK for JS, and for writing this issue up. The ability to set temperature is not available in the v1 Beta API for Assistants, but was recently released in the v2 Beta API. Azure Assistants support for the v2 Beta API is being implemented, and I'll update this issue once that support reaches the JS SDK.

gokulsathyan-ulai commented 6 months ago

@glharper What is the default temperature for models in azure openai assistants?

glharper commented 6 months ago

@glharper What is the default temperature for models in azure openai assistants?

I'd assume the same default as for OpenAI Assistant models, 1, but I can't find any Azure specific ref docs to back that up.

gokulsathyan-ulai commented 5 months ago

@glharper Is there any other way for me to make the temperature 0?

gokulsathyan-ulai commented 5 months ago

@glharper Is there any other way for me to make the temperature 0?

chahalinder0007 commented 5 months ago

any updates on this one @glharper ?

trrwilson commented 5 months ago

Hello, @chahalinder0007!

We've quite recently achieved one of our partnership goals with OpenAI and released dedicated Azure sub-client support in the official OpenAI node.js package. Converged support via that library will be our strategy moving forward, including for ensuring timely availability of things like this temperature setting in Assistants.

You can read more about the Azure sub-client configuration process in the readme, here: https://github.com/openai/openai-node/tree/master?tab=readme-ov-file#microsoft-azure-openai

Apologies for the whiplash, and we're working to get all of our docs and samples migrated ASAP. But the good news is that you can definitely configure temperature today with the new sub-client!

codylittle commented 4 months ago

Hey @trrwilson, thanks for the heads up, will/has this been published anywhere else? I'm mildly concerned about how this will look for the MS first party features such as the "On your data" extensions. Are there plans for the OpenAI library to contain the APIs for managing deployments & content filters?

deyaaeldeen commented 3 months ago

Hi @codylittle, we strongly recommend that you migrate to use the AzureOpenAI client exported by the official OpenAI client library for JavaScript. Checkout the migration guide for how to do so while maintaining typing for Azure features.

Please let us know if you have any other questions!