bioguider 0.2.6__tar.gz → 0.2.7__tar.gz
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.
Potentially problematic release.
This version of bioguider might be problematic. Click here for more details.
- {bioguider-0.2.6 → bioguider-0.2.7}/PKG-INFO +2 -1
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/agent_tools.py +10 -1
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/evaluation_installation_task.py +10 -1
- {bioguider-0.2.6 → bioguider-0.2.7}/pyproject.toml +2 -1
- {bioguider-0.2.6 → bioguider-0.2.7}/LICENSE +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/README.md +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/__init__.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/__init__.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/agent_task.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/agent_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/collection_execute_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/collection_observe_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/collection_plan_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/collection_task.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/collection_task_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/common_agent.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/common_agent_2step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/common_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/dockergeneration_execute_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/dockergeneration_observe_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/dockergeneration_plan_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/dockergeneration_task.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/dockergeneration_task_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/evaluation_task.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/identification_execute_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/identification_observe_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/identification_plan_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/identification_task.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/identification_task_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/peo_common_step.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/prompt_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/python_ast_repl_tool.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/agents/rag_collection_task.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/conversation.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/database/summarized_file_db.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/managers/evaluation_manager.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/rag/__init__.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/rag/config.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/rag/data_pipeline.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/rag/embedder.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/rag/rag.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/settings.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/utils/constants.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/utils/default.gitignore +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/utils/file_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/utils/gitignore_checker.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/utils/pyphen_utils.py +0 -0
- {bioguider-0.2.6 → bioguider-0.2.7}/bioguider/utils/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: bioguider
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: An AI-Powered package to help biomedical developers to generate clear documentation
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Cankun Wang
|
|
@@ -28,6 +28,7 @@ Requires-Dist: langchain-experimental (>=0.3.4,<0.4.0)
|
|
|
28
28
|
Requires-Dist: langchain-google-genai (>=2.1.4,<3.0.0)
|
|
29
29
|
Requires-Dist: langchain-openai (>=0.3.8,<0.4.0)
|
|
30
30
|
Requires-Dist: langgraph (>=0.3.11,<0.4.0)
|
|
31
|
+
Requires-Dist: markdownify (>=1.1.0,<2.0.0)
|
|
31
32
|
Requires-Dist: nanoid (>=2.0.0,<3.0.0)
|
|
32
33
|
Requires-Dist: pydantic (>=2.10.6,<3.0.0)
|
|
33
34
|
Requires-Dist: pydantic-settings (>=2.8.1,<3.0.0)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Callable
|
|
3
|
+
from markdownify import markdownify as md
|
|
3
4
|
from langchain_openai.chat_models.base import BaseChatOpenAI
|
|
4
5
|
from bioguider.database.summarized_file_db import SummarizedFilesDb
|
|
5
6
|
from bioguider.utils.file_utils import get_file_type
|
|
6
7
|
from bioguider.agents.agent_utils import read_directory, read_file, summarize_file
|
|
8
|
+
from bioguider.rag.data_pipeline import count_tokens
|
|
7
9
|
|
|
8
10
|
class agent_tool:
|
|
9
11
|
def __init__(
|
|
@@ -39,7 +41,14 @@ Returns:
|
|
|
39
41
|
file_path = os.path.join(self.repo_path, file_path)
|
|
40
42
|
if not os.path.isfile(file_path):
|
|
41
43
|
return None
|
|
42
|
-
|
|
44
|
+
content = read_file(file_path)
|
|
45
|
+
if file_path.endswith(".html") or file_path.endswith(".htm"):
|
|
46
|
+
content = md(content, escape_underscores=False)
|
|
47
|
+
tokens = count_tokens(content)
|
|
48
|
+
MAX_TOKENS = os.environ.get('OPENAI_MAX_INPUT_TOKENS', 102400)
|
|
49
|
+
if tokens > int(MAX_TOKENS):
|
|
50
|
+
content = content[:100000]
|
|
51
|
+
return content
|
|
43
52
|
|
|
44
53
|
class summarize_file_tool(agent_tool):
|
|
45
54
|
""" read and summarize the file
|
|
@@ -6,9 +6,11 @@ from abc import ABC, abstractmethod
|
|
|
6
6
|
from langchain.prompts import ChatPromptTemplate
|
|
7
7
|
from langchain_openai.chat_models.base import BaseChatOpenAI
|
|
8
8
|
from pydantic import BaseModel, Field
|
|
9
|
+
from markdownify import markdownify as md
|
|
9
10
|
|
|
10
11
|
from bioguider.agents.agent_utils import read_file
|
|
11
12
|
from bioguider.utils.constants import DEFAULT_TOKEN_USAGE, ProjectMetadata
|
|
13
|
+
from bioguider.rag.data_pipeline import count_tokens
|
|
12
14
|
from .common_agent_2step import CommonAgentTwoSteps, CommonAgentTwoChainSteps
|
|
13
15
|
from .common_agent import CommonConversation
|
|
14
16
|
from ..utils.pyphen_utils import PyphenReadability
|
|
@@ -122,8 +124,15 @@ class EvaluationInstallationTask(EvaluationTask):
|
|
|
122
124
|
return None
|
|
123
125
|
|
|
124
126
|
files_content = ""
|
|
127
|
+
MAX_TOKENS = os.environ.get("OPENAI_MAX_INPUT_TOKENS", 102400)
|
|
125
128
|
for f in files:
|
|
126
|
-
|
|
129
|
+
if f.endswith(".html") or f.endswith(".htm"):
|
|
130
|
+
html = read_file(os.path.join(self.repo_path, f))
|
|
131
|
+
content = md(html, escape_underscores=False)
|
|
132
|
+
else:
|
|
133
|
+
content = read_file(os.path.join(self.repo_path, f))
|
|
134
|
+
if count_tokens(content) > int(MAX_TOKENS):
|
|
135
|
+
content = content[:100000]
|
|
127
136
|
files_content += f"""
|
|
128
137
|
{f} content:
|
|
129
138
|
{content}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "bioguider"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7"
|
|
4
4
|
description = "An AI-Powered package to help biomedical developers to generate clear documentation"
|
|
5
5
|
authors = [
|
|
6
6
|
"Cankun Wang <Cankun.Wang@osumc.edu>",
|
|
@@ -45,6 +45,7 @@ faiss-cpu = "^1.11.0"
|
|
|
45
45
|
binaryornot = "^0.4.4"
|
|
46
46
|
textstat = "^0.7.6"
|
|
47
47
|
pyphen = "^0.17.2"
|
|
48
|
+
markdownify = "^1.1.0"
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
[tool.poetry.group.dev.dependencies]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|