microsoft / FLAML

A fast library for AutoML and tuning. Join our Discord: https://discord.gg/Cppx2vSPVP.
https://microsoft.github.io/FLAML/
MIT License
3.76k stars 495 forks source link

Re. cannot import name 'oai' from 'flaml' (/usr/local/lib/python3.10/dist-packages/flaml/__init__.py) #1233

Open andysingal opened 9 months ago

andysingal commented 9 months ago

While working:

!pip install -qqq flaml

config_list = oai.config_list_openai_aoai(openai_api_key_file='')

but getting error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-4-6f5d77c6d288>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from flaml import oai
      2 
      3 config_list = oai.config_list_openai_aoai(openai_api_key_file='')

ImportError: cannot import name 'oai' from 'flaml' (/usr/local/lib/python3.10/dist-packages/flaml/__init__.py)

Morever, Love to know how to use: https://microsoft.github.io/autogen/docs/reference/oai/openai_utils/#config_list_from_json within the above code, since there are no examples on it.

Thanks, Andy

thinkall commented 9 months ago

Hi @andysingal , thanks for reaching out. We're migrating autogen to a dedicated github repo https://github.com/microsoft/autogen , I'd suggest you try it out. The examples you're looking for is https://github.com/microsoft/autogen/blob/main/notebook/oai_openai_utils.ipynb