vector-vault 4.2.3__tar.gz → 4.2.4__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.
- {vector_vault-4.2.3 → vector_vault-4.2.4}/PKG-INFO +1 -1
- {vector_vault-4.2.3 → vector_vault-4.2.4}/setup.py +1 -1
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vector_vault.egg-info/PKG-INFO +1 -1
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/tools_gpt.py +17 -12
- {vector_vault-4.2.3 → vector_vault-4.2.4}/LICENSE +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/README.md +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/setup.cfg +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vector_vault.egg-info/SOURCES.txt +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vector_vault.egg-info/dependency_links.txt +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vector_vault.egg-info/requires.txt +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vector_vault.egg-info/top_level.txt +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/__init__.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/ai.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/cloud_api.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/cloudmanager.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/creds.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/download.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/itemize.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/vault.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/vecreq.py +0 -0
- {vector_vault-4.2.3 → vector_vault-4.2.4}/vectorvault/wrap.py +0 -0
|
@@ -4,11 +4,13 @@ import ast
|
|
|
4
4
|
|
|
5
5
|
'''
|
|
6
6
|
ToolsGPT is a set of tools special to large language models.
|
|
7
|
-
Every tool turns
|
|
7
|
+
Every tool turns unstructured data into structured data.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Structure data is required to run programs.
|
|
10
|
+
Unstructured data is the primary human output.
|
|
11
|
+
AI tools convert unstructured data into structured data,
|
|
12
|
+
bridging the gap between humans and programs.
|
|
13
|
+
Therefore, in the future, everything will be programmable.
|
|
12
14
|
|
|
13
15
|
ToolsGPT allows you to get the following for any input:
|
|
14
16
|
1. `get_rating` - returns a rating out of 10 for any input
|
|
@@ -19,21 +21,21 @@ import ast
|
|
|
19
21
|
6. `get_topic` - returns the topic subject matter of any input
|
|
20
22
|
|
|
21
23
|
1. `get_rating`:
|
|
22
|
-
|
|
24
|
+
Get a numeric rating out of 10 for anything
|
|
23
25
|
|
|
24
26
|
2. `get_yes_no`:
|
|
25
|
-
|
|
27
|
+
Get an exact 'yes' or 'no' to any question
|
|
26
28
|
|
|
27
29
|
3. `get_number`:
|
|
28
|
-
|
|
30
|
+
Get an integer output for any input
|
|
29
31
|
|
|
30
32
|
4. `get_match`:
|
|
31
|
-
|
|
33
|
+
Get an exact match to a single item within a list
|
|
32
34
|
-> in: (text and list of strings)
|
|
33
35
|
-> out: (one exact match to an answer in list -> string type)
|
|
34
36
|
|
|
35
37
|
5. `get_multi_match`:
|
|
36
|
-
|
|
38
|
+
Get many matches to items within a list
|
|
37
39
|
-> in: (text and list of answers)
|
|
38
40
|
-> out: (list of exact matches -> list type)
|
|
39
41
|
|
|
@@ -76,9 +78,8 @@ that this number has been carefully considered given your concept. My rating out
|
|
|
76
78
|
|
|
77
79
|
def get_number(self, concept, content: str, model='gpt-3.5-turbo', loop_limit=5) -> int:
|
|
78
80
|
'''
|
|
79
|
-
param: `concept` -
|
|
80
|
-
|
|
81
|
-
Prompt = f"{concept} \n\n{content}"
|
|
81
|
+
param: `concept` - is the idea used to generate a number with - i.e. "How many students are in the professor's class?"
|
|
82
|
+
param: `content` - is the content to generate a number for - i.e. "I had 400 students in my class last year, but this year, I have 10% more."
|
|
82
83
|
'''
|
|
83
84
|
response = self.retry_llm(f'{concept} \n\n{content}', model=model, loop_limit=loop_limit)
|
|
84
85
|
print("Initial number extraction response:", response) if self.verbose else 0
|
|
@@ -86,6 +87,10 @@ that this number has been carefully considered given your concept. My rating out
|
|
|
86
87
|
|
|
87
88
|
|
|
88
89
|
def retry_until_its_a_number(self, content: str, model='gpt-3.5-turbo', loop_limit=5) -> int:
|
|
90
|
+
'''
|
|
91
|
+
param: `content` - the AI will return an integer based on the content you input
|
|
92
|
+
'''
|
|
93
|
+
|
|
89
94
|
prompt_template = """Respond only with a number in integer format...
|
|
90
95
|
Example content: 'The revenue for the last fiscal year was $1,200,000.' Example answer: '1200000'
|
|
91
96
|
Example content 2: 'The company has been in business for twenty years.' Example answer 2: '20'
|
|
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
|