Find answers from the community

Home
Members
NickkNYC
N
NickkNYC
Offline, last seen 3 months ago
Joined September 25, 2024
#RAGS Help Please - setting keys without using streamlit.
I want to deploy somewhere other than streamlit. The process for getting streamlit to simply use os.getenv for api keys instead of a .toml file (get's exposed) or streamlit hosting (no thanks) is driving me a bit crazy. Where, oh where should I configure this?

please really need help here.
- you are the expert online at the moment πŸ˜‰
23 comments
N
L
r
Just started getting this problem - am running llama-index 0.8.63.post2 - and still getting it. Any thoughts?

Plain Text
ChatOpenAI
2023-11-07T14:17:04.805923173Z __root__
2023-11-07T14:17:04.805930274Z   `openai` has no `ChatCompletion` attribute, this is likely due to an old version of the openai package. Try upgrading it with `pip install --upgrade openai`. (type=value_error)
2023-11-07T14:17:04.805936174Z Traceback (most recent call last):
2023-11-07T14:17:04.805941175Z   File "/tmp/8dbdf9b2c00d254/antenv/lib/python3.11/site-packages/chainlit/utils.py", line 39, in wrapper
2023-11-07T14:17:04.805946375Z     return await user_function(**params_values)
2023-11-07T14:17:04.805951175Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-07T14:17:04.805955976Z   File "/tmp/8dbdf9b2c00d254/app.py", line 60, in factory
2023-11-07T14:17:04.805960876Z     llm = LangChainLLM(ChatOpenAI(
2023-11-07T14:17:04.805972377Z                        ^^^^^^^^^^^
2023-11-07T14:17:04.805989079Z   File "/tmp/8dbdf9b2c00d254/antenv/lib/python3.11/site-packages/langchain/load/serializable.py", line 97, in __init__
2023-11-07T14:17:04.805994380Z     super().__init__(**kwargs)
2023-11-07T14:17:04.805999280Z   File "/tmp/8dbdf9b2c00d254/antenv/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in __init__
2023-11-07T14:17:04.806004280Z     raise validation_error
2023-11-07T14:17:04.806009081Z pydantic.v1.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
2023-11-07T14:17:04.806013981Z __root__
2023-11-07T14:17:04.806018682Z   `openai` has no `ChatCompletion` attribute, this is likely due to an old version of the openai package. Try upgrading it with `pip install --upgrade openai`. (type=value_error)`
11 comments
L
N