bioguider 0.2.52__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bioguider/__init__.py +0 -0
- bioguider/agents/__init__.py +0 -0
- bioguider/agents/agent_task.py +92 -0
- bioguider/agents/agent_tools.py +176 -0
- bioguider/agents/agent_utils.py +504 -0
- bioguider/agents/collection_execute_step.py +182 -0
- bioguider/agents/collection_observe_step.py +125 -0
- bioguider/agents/collection_plan_step.py +156 -0
- bioguider/agents/collection_task.py +184 -0
- bioguider/agents/collection_task_utils.py +142 -0
- bioguider/agents/common_agent.py +137 -0
- bioguider/agents/common_agent_2step.py +215 -0
- bioguider/agents/common_conversation.py +61 -0
- bioguider/agents/common_step.py +85 -0
- bioguider/agents/consistency_collection_step.py +102 -0
- bioguider/agents/consistency_evaluation_task.py +57 -0
- bioguider/agents/consistency_evaluation_task_utils.py +14 -0
- bioguider/agents/consistency_observe_step.py +110 -0
- bioguider/agents/consistency_query_step.py +77 -0
- bioguider/agents/dockergeneration_execute_step.py +186 -0
- bioguider/agents/dockergeneration_observe_step.py +154 -0
- bioguider/agents/dockergeneration_plan_step.py +158 -0
- bioguider/agents/dockergeneration_task.py +158 -0
- bioguider/agents/dockergeneration_task_utils.py +220 -0
- bioguider/agents/evaluation_installation_task.py +270 -0
- bioguider/agents/evaluation_readme_task.py +767 -0
- bioguider/agents/evaluation_submission_requirements_task.py +172 -0
- bioguider/agents/evaluation_task.py +206 -0
- bioguider/agents/evaluation_tutorial_task.py +169 -0
- bioguider/agents/evaluation_tutorial_task_prompts.py +187 -0
- bioguider/agents/evaluation_userguide_prompts.py +179 -0
- bioguider/agents/evaluation_userguide_task.py +154 -0
- bioguider/agents/evaluation_utils.py +127 -0
- bioguider/agents/identification_execute_step.py +181 -0
- bioguider/agents/identification_observe_step.py +104 -0
- bioguider/agents/identification_plan_step.py +140 -0
- bioguider/agents/identification_task.py +270 -0
- bioguider/agents/identification_task_utils.py +22 -0
- bioguider/agents/peo_common_step.py +64 -0
- bioguider/agents/prompt_utils.py +253 -0
- bioguider/agents/python_ast_repl_tool.py +69 -0
- bioguider/agents/rag_collection_task.py +130 -0
- bioguider/conversation.py +67 -0
- bioguider/database/code_structure_db.py +500 -0
- bioguider/database/summarized_file_db.py +146 -0
- bioguider/generation/__init__.py +39 -0
- bioguider/generation/benchmark_metrics.py +610 -0
- bioguider/generation/change_planner.py +189 -0
- bioguider/generation/document_renderer.py +157 -0
- bioguider/generation/llm_cleaner.py +67 -0
- bioguider/generation/llm_content_generator.py +1128 -0
- bioguider/generation/llm_injector.py +809 -0
- bioguider/generation/models.py +85 -0
- bioguider/generation/output_manager.py +74 -0
- bioguider/generation/repo_reader.py +37 -0
- bioguider/generation/report_loader.py +166 -0
- bioguider/generation/style_analyzer.py +36 -0
- bioguider/generation/suggestion_extractor.py +436 -0
- bioguider/generation/test_metrics.py +189 -0
- bioguider/managers/benchmark_manager.py +785 -0
- bioguider/managers/evaluation_manager.py +215 -0
- bioguider/managers/generation_manager.py +686 -0
- bioguider/managers/generation_test_manager.py +107 -0
- bioguider/managers/generation_test_manager_v2.py +525 -0
- bioguider/rag/__init__.py +0 -0
- bioguider/rag/config.py +117 -0
- bioguider/rag/data_pipeline.py +651 -0
- bioguider/rag/embedder.py +24 -0
- bioguider/rag/rag.py +138 -0
- bioguider/settings.py +103 -0
- bioguider/utils/code_structure_builder.py +59 -0
- bioguider/utils/constants.py +135 -0
- bioguider/utils/default.gitignore +140 -0
- bioguider/utils/file_utils.py +215 -0
- bioguider/utils/gitignore_checker.py +175 -0
- bioguider/utils/notebook_utils.py +117 -0
- bioguider/utils/pyphen_utils.py +73 -0
- bioguider/utils/python_file_handler.py +65 -0
- bioguider/utils/r_file_handler.py +551 -0
- bioguider/utils/utils.py +163 -0
- bioguider-0.2.52.dist-info/LICENSE +21 -0
- bioguider-0.2.52.dist-info/METADATA +51 -0
- bioguider-0.2.52.dist-info/RECORD +84 -0
- bioguider-0.2.52.dist-info/WHEEL +4 -0
bioguider/rag/config.py
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import List
|
|
3
|
+
from adalflow import GoogleGenAIClient
|
|
4
|
+
from adalflow.components.model_client.openai_client import OpenAIClient
|
|
5
|
+
from adalflow.components.model_client.azureai_client import AzureAIClient
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
DEFAULT_EXCLUDED_DIRS: List[str] = [
|
|
9
|
+
# Virtual environments and package managers
|
|
10
|
+
"./.venv/", "./venv/", "./env/", "./virtualenv/",
|
|
11
|
+
"./node_modules/", "./bower_components/", "./jspm_packages/",
|
|
12
|
+
# Version control
|
|
13
|
+
"./.git/", "./.svn/", "./.hg/", "./.bzr/",
|
|
14
|
+
# Cache and compiled files
|
|
15
|
+
"./__pycache__/", "./.pytest_cache/", "./.mypy_cache/", "./.ruff_cache/", "./.coverage/",
|
|
16
|
+
# Build and distribution
|
|
17
|
+
"./dist/", "./build/", "./out/", "./target/", "./bin/", "./obj/",
|
|
18
|
+
# Documentation
|
|
19
|
+
"./docs/", "./_docs/", "./site-docs/", "./_site/",
|
|
20
|
+
# IDE specific
|
|
21
|
+
"./.idea/", "./.vscode/", "./.vs/", "./.eclipse/", "./.settings/",
|
|
22
|
+
# Logs and temporary files
|
|
23
|
+
"./logs/", "./log/", "./tmp/", "./temp/",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
DEFAULT_EXCLUDED_FILES: List[str] = [
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
configs = {
|
|
30
|
+
"embedder": {
|
|
31
|
+
"batch_size": 500,
|
|
32
|
+
"model_client": OpenAIClient,
|
|
33
|
+
"model_kwargs": {
|
|
34
|
+
"model": "text-embedding-3-small",
|
|
35
|
+
"dimensions": 256,
|
|
36
|
+
"encoding_format": "float",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
"retriever": {
|
|
40
|
+
"top_k": 20,
|
|
41
|
+
},
|
|
42
|
+
"generator": {
|
|
43
|
+
"model_client": GoogleGenAIClient,
|
|
44
|
+
"model_kwargs": {
|
|
45
|
+
"model": "gemini-2.5-flash-preview-04-17",
|
|
46
|
+
"temperature": 0.7,
|
|
47
|
+
"top_p": 0.8,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
"text_splitter": {
|
|
51
|
+
"split_by": "word",
|
|
52
|
+
"chunk_size": 350,
|
|
53
|
+
"chunk_overlap": 100,
|
|
54
|
+
},
|
|
55
|
+
"file_filters": {
|
|
56
|
+
"excluded_dirs": [
|
|
57
|
+
"./.venv/", "./venv/", "./env/", "./virtualenv/",
|
|
58
|
+
"./node_modules/", "./bower_components/", "./jspm_packages/",
|
|
59
|
+
"./.git/", "./.svn/", "./.hg/", "./.bzr/",
|
|
60
|
+
"./__pycache__/", "./.pytest_cache/", "./.mypy_cache/", "./.ruff_cache/", "./.coverage/",
|
|
61
|
+
"./dist/", "./build/", "./out/", "./target/", "./bin/", "./obj/",
|
|
62
|
+
"./_docs/", "./site-docs/", "./_site/",
|
|
63
|
+
"./.idea/", "./.vscode/", "./.vs/", "./.eclipse/", "./.settings/",
|
|
64
|
+
"./logs/", "./log/", "./tmp/", "./temp/",
|
|
65
|
+
],
|
|
66
|
+
"excluded_files": [
|
|
67
|
+
"package-lock.json", "yarn.lock", "pnpm-lock.yaml", "npm-shrinkwrap.json",
|
|
68
|
+
"poetry.lock", "Pipfile.lock", "requirements.txt.lock", "Cargo.lock", "composer.lock",
|
|
69
|
+
".lock", ".DS_Store", "Thumbs.db", "desktop.ini", "*.lnk",
|
|
70
|
+
".env", ".env.*", "*.env", "*.cfg", "*.ini", ".flaskenv",
|
|
71
|
+
".gitignore", ".gitattributes", ".gitmodules", ".github", ".gitlab-ci.yml",
|
|
72
|
+
".prettierrc", ".eslintrc", ".eslintignore", ".stylelintrc", ".editorconfig",
|
|
73
|
+
".jshintrc", ".pylintrc", ".flake8", "mypy.ini", "pyproject.toml",
|
|
74
|
+
"tsconfig.json", "webpack.config.js", "babel.config.js", "rollup.config.js",
|
|
75
|
+
"jest.config.js", "karma.conf.js", "vite.config.js", "next.config.js",
|
|
76
|
+
"*.min.js", "*.min.css", "*.bundle.js", "*.bundle.css",
|
|
77
|
+
"*.map", "*.gz", "*.zip", "*.tar", "*.tgz", "*.rar",
|
|
78
|
+
"*.pyc", "*.pyo", "*.pyd", "*.so", "*.dll", "*.class", "*.exe", "*.o", "*.a",
|
|
79
|
+
"*.jpg", "*.jpeg", "*.png", "*.gif", "*.ico", "*.svg", "*.webp",
|
|
80
|
+
"*.mp3", "*.mp4", "*.wav", "*.avi", "*.mov", "*.webm",
|
|
81
|
+
"*.csv", "*.tsv", "*.xls", "*.xlsx", "*.db", "*.sqlite", "*.sqlite3",
|
|
82
|
+
"*.pdf", "*.docx", "*.pptx",
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
"repository": {
|
|
86
|
+
# Maximum repository size in MB
|
|
87
|
+
"size_limit_mb": 50000,
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
def get_embedder_config():
|
|
92
|
+
return configs["embedder"]
|
|
93
|
+
|
|
94
|
+
def create_model_client():
|
|
95
|
+
openai_type = os.environ.get("OPENAI_API_TYPE")
|
|
96
|
+
is_azure = openai_type == "azure" if openai_type is not None else False
|
|
97
|
+
if not is_azure:
|
|
98
|
+
return OpenAIClient()
|
|
99
|
+
return AzureAIClient(
|
|
100
|
+
api_key=os.environ.get("OPENAI_API_KEY"),
|
|
101
|
+
api_version=os.environ.get("OPENAI_API_VERSION"),
|
|
102
|
+
azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
|
|
103
|
+
)
|
|
104
|
+
def create_model_kwargs():
|
|
105
|
+
openai_type = os.environ.get("OPENAI_API_TYPE")
|
|
106
|
+
is_azure = openai_type == "azure" if openai_type is not None else False
|
|
107
|
+
if not is_azure:
|
|
108
|
+
return {
|
|
109
|
+
"model": "text-embedding-3-small",
|
|
110
|
+
"dimensions": 256,
|
|
111
|
+
"encoding_format": "float",
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
"model": os.environ.get("OPENAI_TEXT_EMBEDDING_DEPLOYMENT_NAME"),
|
|
115
|
+
"dimensions": 256,
|
|
116
|
+
"encoding_format": "float",
|
|
117
|
+
}
|