langchain-ai / open-canvas

📃 A better UX for chat, writing content, and coding with LLMs.
https://opencanvas.langchain.com/
MIT License
2.43k stars 353 forks source link

Update custom model selection to include `GPT 4o mini (Azure)` option #102

Closed petrusali closed 2 days ago

petrusali commented 2 weeks ago

NOTE: The customizable model feature is only in the staging branch at this time. You will need to checkout a branch off staging and open your PR against staging to implement this feature.

Update the custom model dropdown options & util for converting model string to modelName and modelProvider to include GPT 4o mini (Azure) which uses the @langchain/openai package, but with Azure credentials. The util which returns modelName and modelProvider should be updated to also return the other init fields which are required to support calling the Azure OpenAI API via the @langchain/openai package.

Finally, please update the .env.example file with the required credentials.

bracesproul commented 1 week ago

@petrusali now that we have the option for customizing the model (in staging branch atm), I've updated the issue title & description to include detailed steps showing how to add support for Azure OpenAI models! Let me know if I'm missing anything from your initial issue (not including Open Router support, LangChain's @langchain/openai class has support for calling the Azure API).