fin-sight icon indicating copy to clipboard operation
fin-sight copied to clipboard

What about clarify_ai_pat??

Open imSrbh opened this issue 2 years ago • 4 comments

@vishwasg217

Unable to get the clarify_ai thing, can you please guide?

KeyError: 'st.secrets has no key "clarify_ai_pat". Did you forget to add it to secrets.toml or the app settings on Streamlit Cloud? More info: https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management'

imSrbh avatar Oct 17 '23 19:10 imSrbh

Hey, I very recently stopped using Clarif AI, but hadn't updated the docs and some of the code to reflect that.

The latest commit should resolve the issue now.

let me know if there are any other issues.

vishwasg217 avatar Oct 17 '23 21:10 vishwasg217

@vishwasg217 There is one more in Page2 related to faiss : Annual Report Analyzer

File "/Users/ss/Projects/finsight/src/pages/2_🗂️_Annual_Report_Analyzer.py", line 178, in st.session_state.index = get_vector_index(documents, vector_store="faiss") File "/Users/ss/Projects/finsight/src/pages/2_🗂️_Annual_Report_Analyzer.py", line 66, in get_vector_index index = VectorStoreIndex.from_documents(documents, .... File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/vector_store/base.py", line 187, in _add_nodes_to_index new_ids = self._vector_store.add(nodes) File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/vector_stores/faiss.py", line 108, in add self._faiss_index.add(text_embedding_np) File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/faiss/class_wrappers.py", line 228, in replacement_add assert d == self.d

imSrbh avatar Oct 18 '23 07:10 imSrbh

can you please share the entire error?

vishwasg217 avatar Oct 18 '23 13:10 vishwasg217

Page1 is fine, but page 2 is having issues... I am also looking into the Faiss. But the same is working fine in the deployed one. finsight-report.streamlit.app/

image

⚡ streamlit run src/🏡_Home.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501 Network URL: http://192.168.1.2:8501

2023-10-18 19:47:01.515 Uncaught app exception Traceback (most recent call last): File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in run_script exec(code, module.dict) File "/Users/ss/Projects/finsight/src/pages/1📊Finance_Metrics_Review.py", line 18, in from src.income_statement import income_statement ModuleNotFoundError: No module named 'src' [Document(id='e5d3d401-fdb5-4b98-99b0-ebd3aab69b1a', embedding=None, metadata={}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={} ... ... ... ata_template='{key}: {value}', metadata_seperator='\n')]


Could not load OpenAIEmbedding. Using HuggingFaceBgeEmbeddings with model_name=BAAI/bge-small-en. If you intended to use OpenAI, please check your OPENAI_API_KEY. Original error: No API key found for OpenAI. Please set either the OPENAI_API_KEY environment variable or openai.api_key prior to initialization. API keys can be found or created at https://platform.openai.com/account/api-keys


2023-10-18 19:47:33.776 Uncaught app exception Traceback (most recent call last): File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in run_script exec(code, module.dict) File "/Users/ss/Projects/finsight/src/pages/2🗂️_Annual_Report_Analyzer.py", line 178, in st.session_state.index = get_vector_index(documents, vector_store="faiss") File "/Users/ss/Projects/finsight/src/pages/2_🗂️_Annual_Report_Analyzer.py", line 66, in get_vector_index index = VectorStoreIndex.from_documents(documents, File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/base.py", line 102, in from_documents return cls( File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/vector_store/base.py", line 49, in init super().init( File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/base.py", line 71, in init index_struct = self.build_index_from_nodes(nodes) File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/vector_store/base.py", line 238, in build_index_from_nodes return self._build_index_from_nodes(nodes) File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/vector_store/base.py", line 226, in _build_index_from_nodes self._add_nodes_to_index( File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/indices/vector_store/base.py", line 187, in _add_nodes_to_index new_ids = self._vector_store.add(nodes) File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/llama_index/vector_stores/faiss.py", line 108, in add self._faiss_index.add(text_embedding_np) File "/Users/ss/Projects/finsight/venv/lib/python3.9/site-packages/faiss/class_wrappers.py", line 228, in replacement_add assert d == self.d AssertionError

imSrbh avatar Oct 18 '23 14:10 imSrbh