runtime error
Exit code: 1. Reason: from langchain-community instead: `from langchain_community.llms import OpenAI`. To install langchain-community run `pip install -U langchain-community`. warnings.warn( /usr/local/lib/python3.10/site-packages/langchain/llms/__init__.py:549: LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead: `from langchain_community.llms import OpenAI`. To install langchain-community run `pip install -U langchain-community`. warnings.warn( /home/user/app/app.py:8: LangChainDeprecationWarning: The class `OpenAI` was deprecated in LangChain 0.0.10 and will be removed in 1.0. An updated version of the class exists in the :class:`~langchain-openai package and should be used instead. To use it run `pip install -U :class:`~langchain-openai` and import as `from :class:`~langchain_openai import OpenAI``. llm = OpenAI(temperature=0.9, openai_api_key=os.getenv("openai")) Traceback (most recent call last): File "/home/user/app/app.py", line 18, in <module> llm = OpenAI(temperature=0.9) File "/usr/local/lib/python3.10/site-packages/langchain_core/_api/deprecation.py", line 224, in warn_if_direct_instance return wrapped(self, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/langchain_core/load/serializable.py", line 130, in __init__ super().__init__(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pydantic/main.py", line 253, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 1 validation error for OpenAI Value error, 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, input_value={'temperature': 0.9, 'mod...ne, 'http_client': None}, input_type=dict] For further information visit https://errors.pydantic.dev/2.11/v/value_error
Container logs:
Fetching error logs...