Add support for proxy servers
Add trust_env=True so that AIOHTTP will use the proxy server defined in the environment, if any.
If this is not done, the following import will result in a (long) timeout:
from tokencost import calculate_prompt_cost, calculate_completion_cost
@caramdache Just saw this--- can you clarify what you mean and/or raise a PR? Seems like a simple fix?
It's not such a good idea to have imports that make HTTP calls, as it may be slow or even timeout. Or you could even be behind a proxy server. You need to at least let the http library access the environnement to get the address of the proxy server. Hence the patch. Without it the import will stall for a few minutes before timing out and failing.
Sorry for sitting on this for a while-- merged. Thanks @caramdache !