Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 0.1.1 #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/
.idea
target
*.iml
.DS_Store
*.log
*.tmp
*~
*#
metals*
.bloop*
**pass.txt
*.sc

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.se
__pycache__/

###### Serverless

# Logs
logs
*.log
npm-debug.log

# Runtime data
pids
*.pid
*.seed
dist

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

#IDE Stuff
**/.idea
.vscode/

#OS STUFF
.DS_Store
.tmp

#SERVERLESS STUFF
admin.env
.env
_meta
.serverless

#DOCUMENTATION EXTRAS


#Python
*.ipynb_checkpoints
*pass.py
analysis/data/*
results/

#Pipenv / PipFile
*.lock

#Creds
*credentials
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.ipynb_checkpoints

# streamlit
**/secrets.toml
**/secrets-server.toml
**/.pytest_cache/
**/Pipfile.lock
*.p8
app_data/*
tests/cache/langchain/*
notebooks/**/*.csv
.deepeval-cache.json


# Local .terraform directories
**/.terraform/*
.terraform.*
tmp/
*_tmp.txt
*.zip
43 changes: 39 additions & 4 deletions all_rag_techniques/adaptive_retrieval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,44 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/nicapotato/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/IPython/core/interactiveshell.py:3577: LangChainDeprecationWarning: As of langchain-core 0.3.0, LangChain uses pydantic v2 internally. The langchain_core.pydantic_v1 module was a compatibility shim for pydantic v1, and should no longer be used. Please update the code to import from Pydantic directly.\n",
"\n",
"For example, replace imports like: `from langchain_core.pydantic_v1 import BaseModel`\n",
"with: `from pydantic import BaseModel`\n",
"or the v1 compatibility namespace if you are working in a code base that has not been fully upgraded to pydantic 2 yet. \tfrom pydantic.v1 import BaseModel\n",
"\n",
" exec(code_obj, self.user_global_ns, self.user_ns)\n",
"2024-09-29 00:26:09.071 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n",
"2024-09-29 00:26:09.147 \n",
" \u001b[33m\u001b[1mWarning:\u001b[0m to view this Streamlit app on a browser, run it with the following\n",
" command:\n",
"\n",
" streamlit run /Users/nicapotato/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/ipykernel_launcher.py [ARGUMENTS]\n",
"2024-09-29 00:26:09.147 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n"
]
},
{
"ename": "FileNotFoundError",
"evalue": "No secrets found. Valid paths for a secrets.toml file or secret directories are: /Users/nicapotato/.streamlit/secrets.toml, /Users/nicapotato/Documents/repo/project/ds-data-app/ds_data_app/logic/langchain/rag/RAG_Techniques/all_rag_techniques/.streamlit/secrets.toml",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 18\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mlangchain_core\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpydantic_v1\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m BaseModel, Field\n\u001b[1;32m 17\u001b[0m sys\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mappend(os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mabspath(os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mjoin(os\u001b[38;5;241m.\u001b[39mgetcwd(), \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m..\u001b[39m\u001b[38;5;124m'\u001b[39m))) \u001b[38;5;66;03m# Add the parent directory to the path sicnce we work with notebooks\u001b[39;00m\n\u001b[0;32m---> 18\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mhelper_functions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mevaluation\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mevalute_rag\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 21\u001b[0m \u001b[38;5;66;03m# Load environment variables from a .env file\u001b[39;00m\n",
"File \u001b[0;32m~/Documents/repo/project/ds-data-app/ds_data_app/logic/langchain/rag/RAG_Techniques/helper_functions.py:22\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mds_data_app\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlogic\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m get_secret\n\u001b[0;32m---> 22\u001b[0m os\u001b[38;5;241m.\u001b[39menviron[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mOPENAI_API_KEY\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[43mget_secret\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mchat-gpt\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mopenai-personal-key\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 24\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mreplace_t_with_space\u001b[39m(list_of_documents):\n\u001b[1;32m 25\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 26\u001b[0m \u001b[38;5;124;03m Replaces all tab characters ('\\t') with spaces in the page content of each document.\u001b[39;00m\n\u001b[1;32m 27\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[38;5;124;03m The modified list of documents with tab characters replaced by spaces.\u001b[39;00m\n\u001b[1;32m 33\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n",
"File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/streamlit/runtime/secrets.py:491\u001b[0m, in \u001b[0;36mSecrets.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 485\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Return the value with the given key. If no such key\u001b[39;00m\n\u001b[1;32m 486\u001b[0m \u001b[38;5;124;03mexists, raise a KeyError.\u001b[39;00m\n\u001b[1;32m 487\u001b[0m \n\u001b[1;32m 488\u001b[0m \u001b[38;5;124;03mThread-safe.\u001b[39;00m\n\u001b[1;32m 489\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 490\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 491\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_parse\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m[key]\n\u001b[1;32m 492\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, Mapping):\n\u001b[1;32m 493\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n",
"File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/streamlit/runtime/secrets.py:393\u001b[0m, in \u001b[0;36mSecrets._parse\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 387\u001b[0m error_msg \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 388\u001b[0m secret_error_messages_singleton\u001b[38;5;241m.\u001b[39mget_no_secrets_found_message(\n\u001b[1;32m 389\u001b[0m file_paths\n\u001b[1;32m 390\u001b[0m )\n\u001b[1;32m 391\u001b[0m )\n\u001b[1;32m 392\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_print_exception_if_not_suppressed(error_msg)\n\u001b[0;32m--> 393\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mFileNotFoundError\u001b[39;00m(error_msg)\n\u001b[1;32m 395\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m k, v \u001b[38;5;129;01min\u001b[39;00m secrets\u001b[38;5;241m.\u001b[39mitems():\n\u001b[1;32m 396\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_maybe_set_environment_variable(k, v)\n",
"\u001b[0;31mFileNotFoundError\u001b[0m: No secrets found. Valid paths for a secrets.toml file or secret directories are: /Users/nicapotato/.streamlit/secrets.toml, /Users/nicapotato/Documents/repo/project/ds-data-app/ds_data_app/logic/langchain/rag/RAG_Techniques/all_rag_techniques/.streamlit/secrets.toml"
]
}
],
"source": [
"import os\n",
"import sys\n",
Expand All @@ -123,7 +158,7 @@
"from typing import Dict, Any\n",
"from langchain.docstore.document import Document\n",
"from langchain_openai import ChatOpenAI\n",
"from langchain_core.pydantic_v1 import BaseModel, Field\n",
"from pydantic import BaseModel, Field\n",
"\n",
"\n",
"sys.path.append(os.path.abspath(os.path.join(os.getcwd(), '..'))) # Add the parent directory to the path sicnce we work with notebooks\n",
Expand Down Expand Up @@ -552,7 +587,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.0"
"version": "3.12.6"
}
},
"nbformat": 4,
Expand Down
41 changes: 38 additions & 3 deletions all_rag_techniques/contextual_compression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,44 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/wb/qw2d5rfj7p95jckpfvkk7xsr0000gn/T/ipykernel_61287/3990753859.py:10: LangChainDeprecationWarning: As of langchain-core 0.3.0, LangChain uses pydantic v2 internally. The langchain_core.pydantic_v1 module was a compatibility shim for pydantic v1, and should no longer be used. Please update the code to import from Pydantic directly.\n",
"\n",
"For example, replace imports like: `from langchain_core.pydantic_v1 import BaseModel`\n",
"with: `from pydantic import BaseModel`\n",
"or the v1 compatibility namespace if you are working in a code base that has not been fully upgraded to pydantic 2 yet. \tfrom pydantic.v1 import BaseModel\n",
"\n",
" from helper_functions import *\n",
"2024-09-29 00:25:48.767 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n",
"2024-09-29 00:25:48.848 \n",
" \u001b[33m\u001b[1mWarning:\u001b[0m to view this Streamlit app on a browser, run it with the following\n",
" command:\n",
"\n",
" streamlit run /Users/nicapotato/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/ipykernel_launcher.py [ARGUMENTS]\n",
"2024-09-29 00:25:48.848 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n"
]
},
{
"ename": "FileNotFoundError",
"evalue": "No secrets found. Valid paths for a secrets.toml file or secret directories are: /Users/nicapotato/.streamlit/secrets.toml, /Users/nicapotato/Documents/repo/project/ds-data-app/ds_data_app/logic/langchain/rag/RAG_Techniques/all_rag_techniques/.streamlit/secrets.toml",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 10\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mlangchain\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mchains\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m RetrievalQA\n\u001b[1;32m 9\u001b[0m sys\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mappend(os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mabspath(os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mjoin(os\u001b[38;5;241m.\u001b[39mgetcwd(), \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m..\u001b[39m\u001b[38;5;124m'\u001b[39m))) \u001b[38;5;66;03m# Add the parent directory to the path sicnce we work with notebooks\u001b[39;00m\n\u001b[0;32m---> 10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mhelper_functions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mevaluation\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mevalute_rag\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 13\u001b[0m \u001b[38;5;66;03m# Load environment variables from a .env file\u001b[39;00m\n",
"File \u001b[0;32m~/Documents/repo/project/ds-data-app/ds_data_app/logic/langchain/rag/RAG_Techniques/helper_functions.py:22\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mds_data_app\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlogic\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m get_secret\n\u001b[0;32m---> 22\u001b[0m os\u001b[38;5;241m.\u001b[39menviron[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mOPENAI_API_KEY\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[43mget_secret\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mchat-gpt\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mopenai-personal-key\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 24\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mreplace_t_with_space\u001b[39m(list_of_documents):\n\u001b[1;32m 25\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 26\u001b[0m \u001b[38;5;124;03m Replaces all tab characters ('\\t') with spaces in the page content of each document.\u001b[39;00m\n\u001b[1;32m 27\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[38;5;124;03m The modified list of documents with tab characters replaced by spaces.\u001b[39;00m\n\u001b[1;32m 33\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n",
"File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/streamlit/runtime/secrets.py:491\u001b[0m, in \u001b[0;36mSecrets.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 485\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Return the value with the given key. If no such key\u001b[39;00m\n\u001b[1;32m 486\u001b[0m \u001b[38;5;124;03mexists, raise a KeyError.\u001b[39;00m\n\u001b[1;32m 487\u001b[0m \n\u001b[1;32m 488\u001b[0m \u001b[38;5;124;03mThread-safe.\u001b[39;00m\n\u001b[1;32m 489\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 490\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 491\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_parse\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m[key]\n\u001b[1;32m 492\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, Mapping):\n\u001b[1;32m 493\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n",
"File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/ds-data-app-eEW-Ncv_-py3.12/lib/python3.12/site-packages/streamlit/runtime/secrets.py:393\u001b[0m, in \u001b[0;36mSecrets._parse\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 387\u001b[0m error_msg \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 388\u001b[0m secret_error_messages_singleton\u001b[38;5;241m.\u001b[39mget_no_secrets_found_message(\n\u001b[1;32m 389\u001b[0m file_paths\n\u001b[1;32m 390\u001b[0m )\n\u001b[1;32m 391\u001b[0m )\n\u001b[1;32m 392\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_print_exception_if_not_suppressed(error_msg)\n\u001b[0;32m--> 393\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mFileNotFoundError\u001b[39;00m(error_msg)\n\u001b[1;32m 395\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m k, v \u001b[38;5;129;01min\u001b[39;00m secrets\u001b[38;5;241m.\u001b[39mitems():\n\u001b[1;32m 396\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_maybe_set_environment_variable(k, v)\n",
"\u001b[0;31mFileNotFoundError\u001b[0m: No secrets found. Valid paths for a secrets.toml file or secret directories are: /Users/nicapotato/.streamlit/secrets.toml, /Users/nicapotato/Documents/repo/project/ds-data-app/ds_data_app/logic/langchain/rag/RAG_Techniques/all_rag_techniques/.streamlit/secrets.toml"
]
}
],
"source": [
"import os\n",
"import sys\n",
Expand Down Expand Up @@ -209,7 +244,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.1"
"version": "3.12.6"
}
},
"nbformat": 4,
Expand Down
Loading