mb-rag 1.1.63__tar.gz → 1.1.65__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 mb-rag might be problematic. Click here for more details.
- {mb_rag-1.1.63 → mb_rag-1.1.65}/PKG-INFO +1 -1
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/prompts_bank.py +13 -1
- mb_rag-1.1.65/mb_rag/utils/llm_wrapper.py +22 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/version.py +1 -1
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag.egg-info/PKG-INFO +1 -1
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag.egg-info/SOURCES.txt +1 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/README.md +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/__init__.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/basic.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/chatbot/__init__.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/chatbot/chains.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/chatbot/conversation.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/rag/__init__.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/rag/embeddings.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/utils/__init__.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/utils/all_data_extract.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/utils/bounding_box.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/utils/document_extract.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/utils/extra.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag/utils/pdf_extract.py +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag.egg-info/dependency_links.txt +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag.egg-info/requires.txt +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/mb_rag.egg-info/top_level.txt +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/pyproject.toml +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/setup.cfg +0 -0
- {mb_rag-1.1.63 → mb_rag-1.1.65}/setup.py +0 -0
|
@@ -34,7 +34,19 @@ Assistant: Goodbye! Have a great day!""",
|
|
|
34
34
|
Human: Please create a to-do list for the following task: {task}
|
|
35
35
|
Assistant:""",
|
|
36
36
|
|
|
37
|
-
"map_function": "*map(lambda x: image_url, baseframes_list)"
|
|
37
|
+
"map_function": "*map(lambda x: image_url, baseframes_list)",
|
|
38
|
+
|
|
39
|
+
"SQL_AGENT_SYS_PROMPT": """You are an expert SQL agent. Your task is to generate and execute SQL queries based on user requests.
|
|
40
|
+
RULES:
|
|
41
|
+
- THINK step by step before answering.
|
|
42
|
+
- Use the provided database schema to inform your queries.
|
|
43
|
+
- When you need to retrieve data, generate a SQL query and execute it using the provided tools.
|
|
44
|
+
- Read-only mode: Do not attempt to modify the database.
|
|
45
|
+
- NO INSERT/UPDATE/DELETE/ALTER/DROP/CREATE/REPLACE/TRUNCATE statements allowed.
|
|
46
|
+
- LIMIT your results to 10 rows. Unless specified otherwise.
|
|
47
|
+
- If you encounter an error while executing a query, analyze the error message and adjust your query accordingly.
|
|
48
|
+
- Prefer using explicit column names instead of SELECT * for better performance.
|
|
49
|
+
- Always ensure your SQL syntax is correct. """
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
def get_template(self, name: str) -> str:
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## simple llm wrapper to replace invoke with invoke_query/own model query
|
|
2
|
+
|
|
3
|
+
__all__ = ["LLMWrapper"]
|
|
4
|
+
|
|
5
|
+
class LLMWrapper:
|
|
6
|
+
"""A simple wrapper for the language model to standardize the invoke method.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
def __init__(self, llm):
|
|
10
|
+
self.llm = llm
|
|
11
|
+
|
|
12
|
+
def invoke_query(self, prompt: str) -> str:
|
|
13
|
+
"""
|
|
14
|
+
Invoke the language model with the given prompt.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
prompt (str): The prompt to send to the language model.
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
str: The generated response.
|
|
21
|
+
"""
|
|
22
|
+
return self.llm.invoke(prompt)
|
|
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
|