davidmigloz / langchain_dart

Build LLM-powered Dart/Flutter applications.
https://langchaindart.dev
MIT License
426 stars 75 forks source link

How to implement Azure Open AI to LangChain.dart? #529

Closed Percival-Chan closed 2 months ago

Percival-Chan commented 2 months ago

Issue with current documentation:

I would prefer using Azure OpenAi service to call a langchain agent. How can I implement the setup to do so? Here is the part I struggled with the parameter:

_chatModel = ChatOpenAI( apiKey: myKey, organization: "azure", baseUrl: muUrl, defaultOptions: const ChatOpenAIOptions(model: "gpt-4o", temperature: 0,), queryParams: );

It would be great if any example or tutorial would be kindly provided to implement Azure Open Ai.

Screenshot from 2024-08-20 15-48-20

Idea or request for content:

No response

davidmigloz commented 2 months ago

Hey @Percival-Chan ,

In the API docs you can find how to configure ChatOpenAI with Azure: https://pub.dev/documentation/langchain_openai/latest/langchain_openai/ChatOpenAI-class.html#azure-openai-service

Let me know if that works.

Percival-Chan commented 2 months ago

Hey @Percival-Chan ,

In the API docs you can find how to configure ChatOpenAI with Azure: https://pub.dev/documentation/langchain_openai/latest/langchain_openai/ChatOpenAI-class.html#azure-openai-service

Let me know if that works.

It works, thankyou so much, look forward for the langgraph updates!! Cheers.

davidmigloz commented 2 months ago

Great to hear!