microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
31.08k stars 4.54k forks source link

[Issue]: Any good way to turn off the warning from autogen.oai.client ? #3513

Open MicDonald opened 1 week ago

MicDonald commented 1 week ago

Describe the issue

I am running autogen with local LLMs. Is there any good way to turn off the warning from autogen.oai.client or any other warning like:

[autogen.oai.client: 09-11 21:12:41] {349} WARNING - Model LLM is not found. The cost will be 0. In your config_list, add field {"price" : [prompt_price_per_1k, completion_token_price_per_1k]} for customized pricing. [autogen.oai.client: 09-11 21:12:48] {349} WARNING - Model LLM is not found. The cost will be 0. In your config_list, add field {"price" : [prompt_price_per_1k, completion_token_price_per_1k]} for customized pricing. [autogen.oai.client: 09-11 21:12:59] {349} WARNING - Model LLM is not found. The cost will be 0. In your config_list, add field {"price" : [prompt_price_per_1k, completion_token_price_per_1k]} for customized pricing.

Thanks!

Steps to reproduce

No response

Screenshots and logs

No response

Additional Information

No response

aswny commented 1 week ago

I have the same question. I have tried creating a logger and changing log levels but not able to turn it off.

autogptfreak commented 3 days ago

Instead of installing autogen with pip install autogen you can download the autogen project locally and reinstall it with pip but in editable mode: pip install -e "c:/path/to/autogen-folder"

Then in openai_utils.py you can add your config to the OAI_PRICE1K dictionary

You may have to close your IDE and open it again for changes to take effect.

image