Open jonathanlastmileai opened 8 months ago
Yea this is expected behaviour. load_dotenv
moves key-value pairs from .env files --> os value, so you can also do .zshrc
file if you want to permanently add it there forever. We just need to ensure that the api keys are uploaded to the os environment
OK, just need to point out that at least some of our demos don't have the loading code, e.g. pydata. cc @andrew-lastmile
I don't know if this is expected behavior, but I have to call load_dotenv() otherwise I get this:
result.result.UnwrapError: Called
Result.unwrap()on an
Errvalue: "Missing API key 'OPENAI_API_KEY' in environment"
Repro:
Follow the pydata demo steps.
config = AIConfigRuntime.load("pydata.aiconfig.yaml")
inference_options = InferenceOptions(stream=True)
async def main(): query_question = input() print("thinking...") await config.run("sql-generator", params = {"function" : query_question}, options=inference_options) print("done")
if name=="main": asyncio.run(main())