Download config.py from hsynhbk/test: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/hsynhbk/test/resolve/main/config.py
- Command line
-
hf download hf://spaces/hsynhbk/test/config.py
-
curl -L -o config.py https://huggingface.co/spaces/hsynhbk/test/resolve/main/config.py
1.1 kB
| """ | |
| Configuration and environment variable loading for Strike Capital Diligence Automation. | |
| """ | |
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables from .env file | |
| load_dotenv() | |
| # OpenAI Configuration | |
| OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") | |
| OPENAI_MODEL = "gpt-5.1" # GPT-5.1 for generation with reasoning | |
| OPENAI_EMBEDDING_MODEL = "text-embedding-3-small" | |
| # Pinecone Configuration | |
| PINECONE_API_KEY = os.getenv("PINECONE_API_KEY") | |
| PINECONE_HOST = os.getenv("PINECONE_HOST") | |
| PINECONE_INDEX_NAME = os.getenv("PINECONE_INDEX_NAME", "strike-capital") | |
| # Validate required environment variables | |
| def validate_config(): | |
| """Validate that all required environment variables are set.""" | |
| missing = [] | |
| if not OPENAI_API_KEY: | |
| missing.append("OPENAI_API_KEY") | |
| if not PINECONE_API_KEY: | |
| missing.append("PINECONE_API_KEY") | |
| if not PINECONE_HOST: | |
| missing.append("PINECONE_HOST") | |
| if missing: | |
| raise ValueError(f"Missing required environment variables: {', '.join(missing)}") | |
| return True | |