Closed kingabzpro closed 2 months ago
The error message says that the default model could not be configured. It is likely that there is an earlier error message that says something like:
07:07:42.188 | WARNING | controlflow.llm.models - The default LLM model could not be created.
ControlFlow will continue to work, but you must manually provide an LLM model for each agent.
For more information, please see https://controlflow.ai/guides/llms. The error was:
1 validation error for ChatOpenAI
__root__
Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which
contains it, or pass `openai_api_key` as a named parameter. (type=value_error)
Is your OPENAI_API_KEY set, as described here (https://controlflow.ai/installation), or did you change the default LLM without providing full configuration?
The following simple script should run without error or warning if the OpenAI api key is provided:
import controlflow as cf
cf.run('hello')
My bad. You are right.
Description
I was trying to run sample code from examples and getting started and I am getting the same error. Maybe I am missing something or the docs.
Example Code
Version Information
Additional Context
No response