Skip to content

Deep research sample #49

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

Open
wants to merge 1 commit 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
17 changes: 17 additions & 0 deletions samples/deep-research/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here

# Tavily Web Search Configuration
TAVILY_API_KEY=your_tavily_api_key_here

# UiPath Configuration (Optional)
UIPATH_ORCHESTRATOR_URL=https://your-orchestrator.uipath.com
UIPATH_TENANT_NAME=your_tenant_name
UIPATH_CLIENT_ID=your_client_id
UIPATH_CLIENT_SECRET=your_client_secret
UIPATH_STORAGE_BUCKET_POLICY=bucket_id_for_company_policy
UIPATH_STORAGE_BUCKET_TECH=bucket_id_for_technical_docs
UIPATH_STORAGE_BUCKET_KNOWLEDGE=bucket_id_for_knowledge_base
UIPATH_INDEX_POLICY=context_grounding_index_for_policy
UIPATH_INDEX_TECH=context_grounding_index_for_tech
UIPATH_INDEX_KNOWLEDGE=context_grounding_index_for_knowledge
45 changes: 45 additions & 0 deletions samples/deep-research/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[flake8]
max-line-length = 128
extend-ignore =
# E203: whitespace before ':' (conflicts with black)
E203,
# W503: line break before binary operator (conflicts with black)
W503,
# D100: Missing docstring in public module
D100,
# D101: Missing docstring in public class
D101,
# D102: Missing docstring in public method
D102,
# D103: Missing docstring in public function
D103,
# D104: Missing docstring in public package
D104,
# D105: Missing docstring in magic method
D105,
# D107: Missing docstring in __init__
D107,
# F401: imported but unused
F401,
# F841: local variable assigned but never used
F841,
# E501: line too long (already handled by black)
E501,
# D401: First line should be in imperative mood
D401,
exclude =
.git,
__pycache__,
.pytest_cache,
.mypy_cache,
.venv,
build,
dist,
*.egg-info
per-file-ignores =
# Tests can have all sorts of issues
tests/*:E501,D,F,W,N
# Test files can have unused imports
test_*.py:E,F,W,D,N
# Init files can have unused imports
__init__.py:F401,F403
148 changes: 148 additions & 0 deletions samples/deep-research/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
.env
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDE
.vscode/
.idea/
*.swp
*.swo

# MacOS
.DS_Store

# Project specific
config.json
*.txt
*.md.backup

# Temporary files
tmp/
temp/
40 changes: 40 additions & 0 deletions samples/deep-research/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.PHONY: install lint format test test-unit test-e2e diagrams clean help

help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

install: ## Install the package and dev dependencies
uv sync --extra dev

format: ## Format code with black and isort
uv run black .
uv run isort .

lint: ## Run all linters
uv run black --check .
uv run isort --check-only .
uv run flake8 .

typecheck: ## Run mypy type checking (optional)
uv run mypy .

test: ## Run core functionality tests
uv run pytest tests/unit/test_research_planner.py tests/unit/test_research_executor.py tests/unit/test_synthesis_agent.py -v

test-unit: ## Run unit tests only
uv run pytest tests/unit -v

test-e2e: ## Run e2e tests only
uv run pytest tests/e2e -v

test-all: ## Run all tests (may have some failures)
uv run pytest tests/ -v

clean: ## Clean up cache files
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
find . -type d -name ".mypy_cache" -exec rm -rf {} +

check: format lint test ## Run format, lint, and test
Loading