microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
28.94k stars 4.23k forks source link

[Feature Request]: OAI_CONFIG_LIST should accept not only .json, but also .yaml #2559

Open Mai0313 opened 3 months ago

Mai0313 commented 3 months ago

Is your feature request related to a problem? Please describe.

I am currently working on a project where I aim to make multi-agent experiments more structured. To achieve this, I am integrating the entire workflow and configuration using Hydra by FacebookResearch.

For those familiar with PyTorch Lightning, there is a repository called lightning-hydra-template, which is designed to enhance the experience for fine-tuning and training models.

With this in mind, I believe it would be beneficial to have a function that can load configurations from YAML files. Given that YAML and JSON share similar structures, I anticipate that incorporating this functionality should not pose significant challenges.

Describe the solution you'd like

I have devised a solution that I've successfully tested in my project. In the autogen/oai/openai_utils.py file, I propose replacing json.loads with yaml.safe_load to facilitate the loading of YAML files.

I plan to implement this change and will submit a pull request to address this enhancement.

We can split this or make a new function is ok to me.

Additional context

No response

### add yaml support
ekzhu commented 2 months ago

Is it possible to for us to have both JSON and YAML support?

Mai0313 commented 2 months ago

Is it possible to for us to have both JSON and YAML support?

Yes, i already made a PR I did this on my own project as well

Mai0313 commented 2 months ago

sorry i am busy now, i will finish this up later on this month